Which of the following operations is NOT supported by Deque?
Which of the following operations is NOT supported by Deque?
Solution
✅ Correct Option: 3
A deque (double-ended queue) allows insertion and deletion only at its two ends, the front and the rear. So it supports INSERTFRONT, INSERTREAR, DELETEFRONT and DELETEREAR, but not insertion at an arbitrary position such as the middle.
INSERTMIDDLE is not a standard deque operation, which makes it the correct choice.
Options 1, 2 and 4: these are end operations, which are exactly what a deque is designed for.
A deque combines a stack and a queue, since it allows both LIFO and FIFO behaviour by working at both ends.
Related questions:
2025: 22 May Shift 1
2025: 15 May Shift 2