SERIES
Backtracking
Make the choose / explore / un-choose skeleton automatic.
In this seriesNEWSLETTER
01
Subsets: three ways to build a power set
LeetCode 78 has three genuinely different solutions — bit manipulation, backtracking, and iterative expansion — and understanding all three reveals why 'generate all subsets' is the canonical first backtracking problem.Jun 14, 2026 · 10 min read · #00041
02
Combination Sum: backtracking with unlimited reuse
LeetCode 39 looks like a straightforward backtracking problem, but the devil is in one detail: you can reuse the same number. That single rule changes how you control the search and where you prune.Jun 14, 2026 · 10 min read · #00042
03
Permutations: building every ordering with backtracking
LeetCode 46 is the cleanest introduction to decision-tree backtracking — three approaches from a one-liner to a swap-in-place variant, each revealing something different about how to think through enumeration problems.Jun 14, 2026 · 10 min read · #00043
04
Word Search: DFS backtracking that marks and unmarks its own path
LeetCode 79 is where backtracking stops being abstract — the grid forces you to track exactly which cells are in your current path, undo that state on every dead end, and restart cleanly. Two complete solutions showing how a single in-place mutation replaces a whole visited matrix.Jun 14, 2026 · 15 min read · #00044
Occasional notes on what I'm building
Get an email when I publish a new post — engineering write-ups, no spam. Unsubscribe anytime.