In a circular queue using arrays, the rear is at index 4, front is at index 2,…
Coal India Management Trainee CBT · 2026 · 2026 System
In a circular queue using arrays, the rear is at index 4, front is at index 2, and capacity = 5. Which expression checks if the queue is full?
- A.
(rear == front - 1)
- B.
(rear == front)
- C.
(rear + 1 == front)
- D.
((rear + 1) % capacity == front)
Attempted by 33 students.
Sign up free to check your answer
Sign up freeLoading lesson…