Stacks & Queues
Two humble rules, LIFO and FIFO, doing surprisingly heavy lifting.
Start the module
1. Stack Basics · 4 min
0 of 9 lessons · 0% complete
Stacks & Queues visualizer
Every lesson in this module opens with an animation you can step through. This is the first one — Stack Basics: Last one in is the first one out.
Stack Basics
Step 1 of 9
push / popO(1)reachable—
operations
+a
+b
+c
peek
pop
pop
stackempty
a
b
c
A stack is a pile with one open end. Everything happens at the top.
- Lessons
- 9
- Minutes
- 47
- Problems
- 15
- Concepts
- 5
Quiz yourself: 3 questions from this module
1 / 3