Skip to main contentSkip to solution

__________ is a data structure where elements can be added or removed at either ends but not in the middle.

Solution

✅ Correct Option: 2

A deque (double-ended queue) allows insertion and deletion at both the front and the rear, but not in the middle.


Queue: insertion only at the rear and deletion only at the front, so it is restricted to one end for each operation.

Stack: insertion and deletion happen only at one end (the top).

Circular queue: still a queue (insert at rear, delete at front); only the storage is arranged in a circle to reuse space.

Keyboard Shortcuts

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