STACK
LAST IN · FIRST OUT
prostudypk.com
A Pile of Plates: Stack
A
B
C
D
TOP
in / out
Popped:
operation
top item
size
1. LIFO
Last In, First Out
Last in, first out
2. Operations
push(x): put on top · pop(): remove the top
peek(): just look at the top
3. Misalein
A pile of plates, the Undo button
The browser's Back button
COMPUTER SCIENCE · DATA STRUCTURES · PUNJAB BOARDS
‹ Labs
↺
❚❚
1×
Next ›