Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing

Queue

Python data engineering interview problem. Difficulty: intermediate. Pattern: Stacks. About 14 minutes. Part of the Pro drill bank.

Implement a Queue with enqueue, dequeue, front, and empty. Treat this as a production helper: match the contracted return shape, including empty and duplicate inputs.

Implement class Queue with enqueue(x), dequeue() (return value), front(), and empty() → bool.

Examples

Input: Queue enqueue 1,2; dequeue; front Output: 1 then 2 FIFO order.

Topics: lakebench, python, queue, class.

More Python interview questions · All interview problems · Learn data engineering

intermediate

Queue

Interview-style drill: Implement a Queue with enqueue, dequeue, front, and empty.

Implement class `Queue` with `enqueue(x)`, `dequeue()` (return value), `front()`, and `empty()` → bool. Keep the harness prints.