Skip to main contentSkip to solution

Which of the following is TRUE about deque?

Solution

✅ Correct Option: 1

A deque (double-ended queue) allows insertion and deletion at both the front and the rear. This is why it can work as a stack or as a queue, depending on which ends are used.


Options 2 and 3: these restrict the operations to one end each, which describes restricted forms such as input-restricted or output-restricted deques, not a deque in general.

Option 4: LIFO is the order of a stack. A deque does not follow a fixed order, because the order depends on which ends are used.

Keyboard Shortcuts

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