A deque contains ‘a’, ‘p’, ‘l’, ‘m’ and ‘n’ . Elements received after deletion are ‘a’, 'n', ‘m’, ‘p’ and ‘l’. ________________ is the sequence of deletion operations performed on the deque.
A deque contains ‘a’, ‘p’, ‘l’, ‘m’ and ‘n’ . Elements received after deletion are ‘a’, 'n', ‘m’, ‘p’ and ‘l’. ________________ is the sequence of deletion operations performed on the deque.
Solution
✅ Correct Option: 1
Deque from front to rear: a, p, l, m, n. The required deletion order is a, n, m, p, l.
| Element removed | Deque before | End used |
|---|---|---|
| a | a p l m n | Front |
| n | p l m n | Rear |
| m | p l m | Rear |
| p | p l | Front |
| l | l | Rear |
The sequence is DeletionFront, DeletionRear, DeletionRear, DeletionFront, DeletionRear.
Option 2: starts with DeletionRear, which removes n first, not a.
Option 3: the fourth deletion is from the rear, which removes l, not p.
Option 4: the second deletion is from the front, which removes p, not n.
Related questions:
2026: 18 May Shift 2
2026: 20 May Shift 1
2026: 24 May Shift 1