Skip to main contentSkip to solution

Which of the following are the operations performed on the DEQUE?

(A). INSERTFRONT

(B). INSERTREAR

(C). DELETIONFRONT

(D). DELETIONREAR

Solution

✅ Correct Option: 3

A DEQUE (double-ended queue) allows insertion and deletion at both ends. So all four operations are valid: insert at front, insert at rear, delete from front and delete from rear.


Options 1, 2 and 4: each leaves out one valid end operation. A common mistake is to treat the DEQUE like a simple queue (insert at rear, delete from front) or like a stack, but a DEQUE supports all four.

Special cases: an input-restricted DEQUE allows insertion at one end only, and an output-restricted DEQUE allows deletion at one end only.

Keyboard Shortcuts

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