0
A circular queue of size 6 uses indices 0 to 5. The front index is 4 and the rear index (the index of the last element) is 1. How many elements are in the queue?
- A3
- B4
- C5
- D2
Correct answer: B
A circular queue of size 6 uses indices 0 to 5. The front index is 4 and the rear index (the index of the last element) is 1. How many elements are in the queue?