← Quiz: Queues and Deques: all 13 questions
Quiz: Queues and Deques · Question 10 of 13
In a circular queue that stores head and size, how do you know the queue is full?
In a circular queue that stores head and size, how do you know the queue is full?
- A.head == 0
- B.head == size
- C.size == capacity
- D.The last array slot is not None
Answer & explanation
Correct answer: size == capacity
Keeping a size counter avoids the classic confusion where head == tail could mean either empty or full.
Can you get the rest right without peeking?
Take the timed Quiz: Queues and Deques quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →