146 pages, one house style. Every diagram is driven by a real, instrumented implementation of the algorithm it’s showing — step through with the controls or the arrow keys, and the code pane highlights the exact line running at each frame.
← Study library·Pattern 1 — Traversal·Pattern 2 — Tree Recursion·3 — Two Pointers·4 — Sliding Window·5 — Binary Search·6 — Graphs
Order of visitation is the whole subject: what you see, when you see it, and what you are allowed to remember. Twenty-two pages.
One skeleton — ask both children, combine, hand the result up — and twelve mutations of it. What changes between sub-variants is never the traversal; it is what travels, and in which direction. All 30 pages, grouped as in the bundle.
Two indices, and an argument for why moving one of them can never skip the answer. 33 pages.
i advances on a match
986Interval List IntersectionsMediumretire whichever interval ends first
844Backspace String CompareEasyscan right to left with a skip counter
One pass, two boundaries, and an invariant that decides when the window has to give ground. 27 pages.
Halve the space each step — on an array, on a rotation, or on the answer itself. Nine pages.
The graph is usually implicit — neighbours are computed, never stored — and the only design decisions are what a node is and what you carry. Twenty pages so far, across all three graph patterns.
new == old
200Number of IslandsMediumsink as you go, and why the mark comes before the four calls
695Max Area of IslandMediumthe DFS stops returning void — watch 1 + sum flow back up
463Island PerimeterEasynot a traversal — count boundary edges in O(1) space
1254Number of Closed IslandsMediumborder test folded in — and why && short-circuit is a trap
827Making A Large Island⚠ Trapre-flooding is O((mn)²) — pre-label components and map id → size
mn
1905Count Sub IslandsMediumtwo grids in lockstep — why a mismatch must not short-circuit the flood fill
visited set here is a bug — watch it delete correct answers
79Word SearchMediumin-place letter masking — mutate cell to prevent cycle and strictly restore on unwind
212Word Search IIHardTrie-guided joint search — walk board and Trie in lockstep with dead-leaf pruning
980Unique Paths IIIHardHamiltonian grid path — exact empty cell coverage count verified at goal
Earlier or alternate takes on pages that also appear above, kept because they are not duplicates — they use a different explanatory framing. Listed here so nothing in the folder is unreachable.
Each page is fully self-contained — open any one directly, no shared assets required. Theme (light/dark/auto) and reading progress are per page, stored locally in your browser.