Topics / Stacks
📚
Stacks
LIFO data structure — the secret behind balanced parentheses, monotonic stacks, and undo systems.
Why learn Stacks?
-
Underlies every recursive call you ever write.
-
Monotonic stacks unlock "next greater element" patterns.
-
Tiny API, surprisingly deep problem set.
What you can build with Stacks
Expression parsing and balanced-symbol checks Monotonic-stack interview problems Undo/redo systems
Stacks tutorials
2 articlesHand-written tutorials, ordered as a recommended learning path.
- 01 Stacks & Queues A practical introduction to stacks and queues — LIFO vs FIFO, using a Python list as a stack, collections.deque as a queue, and the real-world problems each one solves cleanly.
- 02 Stacks/Queues — Practice Eight classic stack and queue interview problems with worked Python solutions — Valid Parentheses, Min Stack, Daily Temperatures, Sliding Window Maximum, and more.