Search
⌘K

Leetcode 622. Design Circular Queue

Implement a fixed-size circular queue (ring buffer) supporting enqueue, dequeue, Front/Rear, isEmpty and isFull operations without using built-in queue types. The core challenge is to maintain head/tail indices (and size or a reserved slot) with wrap-around so all operations run in O(1) while correctly distinguishing empty vs full.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.