Question:

What will be the position of front and rear after execution of the following statements, the Queue already had the given elements in FIFO order:
\(F→50 → 90 → 7 → 21 → 73 → 77→R\)
dequeue()
dequeue()
dequeue()
dequeue()
dequeue()
enqueue(100)
dequeue()

Updated On: Nov 4, 2024
  • Front 50, Rear 77
  • Front 100, Rear 100
  • Front 77, Rear 100
  • Front 73, Rear 77
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

After five dequeue() operations, the queue becomes empty. enqueue(100) then adds to the rear, and one more dequeue() brings front to 77 and rear to 100.
Was this answer helpful?
0
0