Stack
LIFO thinking, expression evaluation, and the monotonic stack for next-greater problems.
0 of 5 lessons complete · 109 min total
- Stacks: Matching, Evaluating, RememberingBracket matching, postfix evaluation, auxiliary min-tracking, and why 'nearest greater/smaller to the left or right' always means a monotonic stack.Lesson · 16 minNot completed
- The Monotonic StackWatch the stack stay sorted while answering next-greater queries.Animation · 10 minNot completed
- Practice: Classic StacksBracket matching, auxiliary-stack minimums, and postfix evaluation.easymedium×23 problems · 0 solvedPractice · 30 minNot completed
- Practice: Monotonic Stacks & FleetsNext-greater scans, sorted time-to-target fleets, histogram rectangles, and a first taste of backtracking with open/close counts.medium×3hard4 problems · 0 solvedPractice · 45 minNot completed
- Stack CheckpointMonotonic stack invariants, when to pop, and recognizing next-greater phrasing.Checkpoint · 8 minNot completed