Skip to main contentSkip to solution

To perform enqueue and dequeue efficiently on a queue, which of the following operations are required?

A) isEmpty

B) peek

C) isfull

D) update

Solution

✅ Correct Option: 2

Efficient enqueue and dequeue need the supporting operations isEmpty, isFull and peek.

isEmpty checks that the queue has an element before a dequeue, which avoids underflow. isFull checks that there is space before an enqueue, which avoids overflow in a fixed-size queue. peek reads the front element without removing it.


Options 1, 3 and 4: "update" is not a standard queue operation. A queue gives access only at its two ends (insert at rear, remove from front), so changing an arbitrary element goes against the FIFO idea.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question