What will be the status of QUEUE after the end of following operations?
enqueue(34)
enqueue(54)
dequeue( )
enqueue(12)
enqueue(15)
dequeue( )
enqueue(71)
What will be the status of QUEUE after the end of following operations?
enqueue(34)
enqueue(54)
dequeue( )
enqueue(12)
enqueue(15)
dequeue( )
enqueue(71)
Solution
✅ Correct Option: 3
A queue is FIFO (first in, first out): enqueue adds at the rear and dequeue removes from the front.
| Operation | Queue (front to rear) |
|---|---|
| enqueue(34) | 34 |
| enqueue(54) | 34, 54 |
| dequeue( ) | 54 |
| enqueue(12) | 54, 12 |
| enqueue(15) | 54, 12, 15 |
| dequeue( ) | 12, 15 |
| enqueue(71) | 12, 15, 71 |
Options 1 and 2: 34 entered first, so the first dequeue removes it.
Option 4: 54 is removed by the second dequeue, and 15 is still in the queue.
Related questions:
2026: 18 May Shift 2
2026: 29 May Shift 2
2026: 11 May Shift 2