If the Elements "P", "Q", "R", "S" are inserted in order in the Stack and are deleted one at a time, then what will be the order of removal of elements?
(A) P
(B) Q
(C) R
(D) S
If the Elements "P", "Q", "R", "S" are inserted in order in the Stack and are deleted one at a time, then what will be the order of removal of elements?
(A) P
(B) Q
(C) R
(D) S
Solution
✅ Correct Option: 2
A stack follows LIFO (Last In, First Out): the element pushed last is removed first. Since P, Q, R, S are inserted in that order, S is on top and comes out first, then R, then Q, then P.
Removal order: S, R, Q, P, which is (D), (C), (B), (A).
Option 1: this is the order of removal in a queue (FIFO), a common confusion with a stack.
Related questions:
2026: 23 May Shift 2
2026: 23 May Shift 1
2025: 13 May Shift 2