Problem 622 · Medium

Design Circular Queue

Use a fixed ring of slots with head and size, so enqueue and dequeue wrap around in O(1).

Open the interactive visualisation