0
A circular queue of capacity 8 has front = 5 and rear = 2 (0-indexed; front is the first element, rear the last, and the queue is not empty). How many elements does it hold?
- A4
- B5
- C6
- D7
Correct answer: C
A circular queue of capacity 8 has front = 5 and rear = 2 (0-indexed; front is the first element, rear the last, and the queue is not empty). How many elements does it hold?