Multiple choice

In a circular queue of size MAXQUEUE, overflow occurs at

  1. Before incrementing rear, rear = front

  2. After incrementing rear, rear = front

  3. Before incrementing rear, rear = front +1

  4. After incrementing rear, rear = front +1

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In a circular queue, overflow is detected when the next position to be filled (rear) is the same as the current front position.