Which of the following are applications of stack?
A. Pile of clothes in an almirah
B. Multiple chairs in a vertical pile
C. Bangles worn on wrist
D. Pile of boxes of eatables in pantry
Which of the following are applications of stack?
A. Pile of clothes in an almirah
B. Multiple chairs in a vertical pile
C. Bangles worn on wrist
D. Pile of boxes of eatables in pantry
Solution
A stack follows LIFO (Last In, First Out): items are added and removed only at one end, the top. In all four cases, the item placed last is the one taken out first.
All of these fit: clothes piled in an almirah, chairs piled vertically, bangles worn on the wrist, and boxes piled in a pantry.
Bangles on the wrist (C) are the easiest to miss. The last bangle worn is the first one removed, since the others block access to the inner ones, so this is a stack.
Pantry boxes (D) are also a stack, because you add and remove boxes only from the top of the pile.
Related questions:
2025: 16 May Shift 1
2025: 20 May Shift 1