Pop
Take the top item off. Only the top is ever touched.
Stack: Push, pop, peek
pop returns 9: the most recently pushed item leaves first.
Cost
- Best
- O(1)
- Average
- O(1)
- Worst
- O(1)
- Space
- O(1)
Before this
Taught by the same lesson
Stack covers these too, in the same run.