Which statement is true about condition of overflow in the circular Queue? I.…
2021
Which statement is true about condition of overflow in the circular Queue? I. Front = 1 and Rear = N II. Front = Rear + 1
- A.
Only I
- B.
Only II
- C.
Both I and II
- D.
Neither I nor II
Attempted by 540 students.
Show answer & explanation
Correct answer: C
In a circular queue implemented with positions 1 to N, overflow occurs when the queue is full. This can happen in either of these cases:
1. Front = 1 and Rear = N: rear is at the last position and front is at the first position.
2. Front = Rear + 1: after circular wrap-around, rear is immediately before front.
Therefore, both statements I and II are true.