Course 01 · Orientation
Arrays and Stacks
Scan, count, window, LIFO
Walk arrays with one remembered fact, look things up with hash maps, move two pointers, keep unfinished work on a stack, and slide a window over a range.
The course journey
Build one family of skills at a time
Each technique is three short lessons, and each one builds on the lesson before it. A lesson walks through one problem step by step, then hands it to you along with a few more to solve on your own.
- 01Start here
Arrays & Strings
Index in O(1), scan once, write in place, and summarize from both ends. Everything else sits on this.
- Stage 1Single-Pass State TrackingCarry one running value (min, max, or best so far) through a scan1 Lesson · 3 Problems
- Stage 2In-Place Read & Write PointersMaintain a write boundary to filter or compact in
O(1)space1 Lesson · 3 Problems - Stage 3Prefix & Suffix SummariesCombine left and right passes to answer range or exclusion queries1 Lesson · 3 Problems
- 02Pro
Hashing
Sets and maps that answer "seen it?" in O(1). Most O(n²) loops end here.
Stage 1
Hash Set Lookup
Stage 2
Hash Map Complement Lookup
Stage 3
Grouping by Canonical Key
- 03Pro
Two Pointers
Two indexes moving inward. Each move rules out options for good.
Stage 1
Opposite-Direction Pointers
Stage 2
Sorted Pair Search
Stage 3
Greedy Pointer Elimination
- 04Pro
Stack
Last in, first out. Matching, nesting, and next-greater in one pass.
Stage 1
Last-In, First-Out Matching
Stage 2
Augmented Stack
Stage 3
Monotonic Stack
- 05Pro
Sliding Window
A live range over a sequence, updated in O(1) as it moves.
Stage 1
Fixed-Size Sliding Window
Stage 2
Variable-Size Sliding Window
Stage 3
Budgeted Sliding Window