Learning Paths
The decision tree tells you which pattern a problem needs. These paths tell you what order to learn the patterns in so each one builds on the last.
The universal drill loop
Every problem in every path is drilled the same way. Challenge mode strips the solution body so you re-implement from the signature and docstring alone, then restores it on demand.
just challenge <topic> <problem> # strip the solution body, show failing tests
just study <topic> # watch mode: tests re-run on every save
just solution <topic> <problem> # restore the reference solution if stuck
just challenge-done <topic> <problem>
just challenge-progress # see what you have cleared
<topic> is the directory under src/algo/ (e.g. two_pointers, stacks_queues, sliding_window); <problem> is the file stem (e.g. three_sum). The per-path tables below give you the exact pairs.
Choosing a path
| Path | What you build | Prerequisites | Core drills |
|---|---|---|---|
| 1 · Foundations | Scanning a sequence with auxiliary state | Python fluency, Big-O basics | 11 |
| 2 · Graphs & Trees | Traversal, ordering, weighted/heuristic search | Path 1, data-structure sheet | 16 |
| 3 · DP & Backtracking | Recursion trees, then memoized optimization | Path 1, recursion comfort | 16 |
| 4 · Systems & CS Fundamentals | Building-block structures + the theory behind them | Path 1, system-design sheet | 14 + appendix |
Path 1 · Foundations
Prerequisites: comfortable Python; know array/dict/set costs from the Big-O sheet.
| # | Problem | What it teaches |
|---|---|---|
| 1 | arrays/two_sum | Trade space for time with a hash map |
| 2 | arrays/group_anagrams | Hash a canonical key, not the value |
| 3 | arrays/product_except_self | Prefix/suffix passes without division |
| 4 | two_pointers/three_sum | Sort, then converge two pointers |
| 5 | two_pointers/container_with_most_water | Move the pointer that can only help |
| 6 | two_pointers/trapping_rain_water | Pointers plus running maxima |
| 7 | sliding_window/longest_substring_no_repeat | Variable window + a seen-set |
| 8 | sliding_window/min_window_substring | Window with need/have counts |
| 9 | stacks_queues/valid_parentheses | LIFO matching |
| 10 | stacks_queues/daily_temperatures | Monotonic stack for "next greater" |
| 11 | stacks_queues/min_stack | Design: O(1) min via an auxiliary stack |
Drill commands (run in order)
just challenge arrays two_sum
just challenge arrays group_anagrams
just challenge arrays product_except_self
just challenge two_pointers three_sum
just challenge two_pointers container_with_most_water
just challenge two_pointers trapping_rain_water
just challenge sliding_window longest_substring_no_repeat
just challenge sliding_window min_window_substring
just challenge stacks_queues valid_parentheses
just challenge stacks_queues daily_temperatures
just challenge stacks_queues min_stackPath 2 · Graphs & Trees
Prerequisites: Path 1 (recursion, stack/queue mechanics); skim the data-structure sheet for adjacency lists, queues, and union-find.
| # | Problem | What it teaches |
|---|---|---|
| 1 | trees/max_depth | Recursion baseline on a tree |
| 2 | trees/invert_tree | Structural recursion |
| 3 | trees/level_order_traversal | BFS with a queue |
| 4 | trees/validate_bst | DFS carrying bounds / inorder |
| 5 | trees/trie | Design a multiway prefix tree |
| 6 | graphs/number_of_islands | Grid DFS/BFS flood fill |
| 7 | graphs/clone_graph | Traversal + a visited map |
| 8 | graphs/course_schedule | Cycle detection in a DAG |
| 9 | graphs/topological_sort | Dependency ordering (Kahn / DFS) |
| 10 | graphs/word_ladder | BFS shortest path on an implicit graph |
| 11 | graphs/dijkstra | Weighted shortest path (non-negative) |
| 12 | graphs/network_delay_time | Apply Dijkstra to a real prompt |
| 13 | graphs/bellman_ford | Negative edges, relaxation |
| 14 | graphs/a_star_search | Heuristic-guided search |
| 15 | graphs/minimum_spanning_tree | Global structure + union-find |
| 16 | graphs/network_flow | Max flow / min cut (capstone) |
Drill commands (run in order)
just challenge trees max_depth
just challenge trees invert_tree
just challenge trees level_order_traversal
just challenge trees validate_bst
just challenge trees trie
just challenge graphs number_of_islands
just challenge graphs clone_graph
just challenge graphs course_schedule
just challenge graphs topological_sort
just challenge graphs word_ladder
just challenge graphs dijkstra
just challenge graphs network_delay_time
just challenge graphs bellman_ford
just challenge graphs a_star_search
just challenge graphs minimum_spanning_tree
just challenge graphs network_flowPath 3 · DP & Backtracking
Prerequisites: Path 1; be comfortable writing and tracing recursion.
| # | Problem | What it teaches |
|---|---|---|
| 1 | recursion/pow_x_n | Divide-and-conquer recursion |
| 2 | recursion/tower_of_hanoi | Classic recursive decomposition |
| 3 | recursion/generate_parentheses | Recursion under a constraint |
| 4 | backtracking/subsets | The choose / explore / unchoose skeleton |
| 5 | backtracking/permutations | Used-set bookkeeping |
| 6 | backtracking/combination_sum | Reuse elements + pruning |
| 7 | recursion/letter_combinations_phone | Cartesian-product backtracking |
| 8 | backtracking/n_queens | Constraint pruning at scale |
| 9 | dp/climbing_stairs | Turn a recurrence into 1D DP |
| 10 | dp/coin_change | Unbounded DP, minimize cost |
| 11 | dp/knapsack | 0/1 DP, space-optimized |
| 12 | dp/longest_increasing_subseq | DP + binary search |
| 13 | dp/longest_common_subseq | 2D DP over two strings |
| 14 | dp/edit_distance | 2D DP with three transitions |
| 15 | dp/constraint_satisfaction | DP under explicit constraints |
| 16 | dp/traveling_salesman_dp | Bitmask DP (capstone) |
Drill commands (run in order)
just challenge recursion pow_x_n
just challenge recursion tower_of_hanoi
just challenge recursion generate_parentheses
just challenge backtracking subsets
just challenge backtracking permutations
just challenge backtracking combination_sum
just challenge recursion letter_combinations_phone
just challenge backtracking n_queens
just challenge dp climbing_stairs
just challenge dp coin_change
just challenge dp knapsack
just challenge dp longest_increasing_subseq
just challenge dp longest_common_subseq
just challenge dp edit_distance
just challenge dp constraint_satisfaction
just challenge dp traveling_salesman_dpPath 4 · Systems & CS Fundamentals
Prerequisites: Path 1; comfortable reading code; skim the system-design and interview-day sheets.
| # | Problem | What it teaches |
|---|---|---|
| 1 | searching/binary_search | Loop-invariant discipline |
| 2 | searching/find_minimum_rotated | Binary search on a pivot |
| 3 | searching/search_rotated_array | Binary search on transformed input |
| 4 | sorting/quickselect | Partition-based selection (expected O(n)) |
| 5 | sorting/merge_sort_inversions | Divide-and-conquer + counting |
| 6 | heaps/kth_largest | Heap of size k |
| 7 | heaps/merge_k_sorted_lists | k-way merge with a heap |
| 8 | heaps/task_scheduler | Heap + greedy scheduling |
| 9 | linked_lists/reverse_linked_list | Pointer surgery |
| 10 | linked_lists/merge_two_sorted | Merge on linked nodes |
| 11 | linked_lists/lru_cache | Design: hash map + doubly linked list |
| 12 | bit_manipulation/single_number | XOR identities |
| 13 | bit_manipulation/counting_bits | DP over bit patterns |
| 14 | bit_manipulation/reverse_bits | Fixed-width bit operations |
Drill commands (run in order)
just challenge searching binary_search
just challenge searching find_minimum_rotated
just challenge searching search_rotated_array
just challenge sorting quickselect
just challenge sorting merge_sort_inversions
just challenge heaps kth_largest
just challenge heaps merge_k_sorted_lists
just challenge heaps task_scheduler
just challenge linked_lists reverse_linked_list
just challenge linked_lists merge_two_sorted
just challenge linked_lists lru_cache
just challenge bit_manipulation single_number
just challenge bit_manipulation counting_bits
just challenge bit_manipulation reverse_bitsAppendix reading (study, don't drill)
These topics ship in the printable packet (rendered from reference-sheets/appendix-topics.json). Pair each with the drill that makes it concrete:
| Appendix topic | Read it alongside |
|---|---|
| Hash Table Internals | arrays/two_sum, arrays/group_anagrams, linked_lists/lru_cache |
| Amortized Analysis | stacks_queues/daily_temperatures, sorting/quickselect, dynamic arrays |
| Concurrency & Parallelism Primitives | heaps/task_scheduler |
| Recursion to Iteration Conversion | recursion/tower_of_hanoi, recursion/pow_x_n, recursion/flatten_nested_list |
| Fixed-Width & Numeric Pitfalls | bit_manipulation/reverse_bits, bit_manipulation/single_number, strings/string_to_integer_atoi |
Pacing a path
How you spread the drills matters more than how fast you finish. Pick the cadence that fits your timeline.
2-week sprint
- Days 1-4: Path 1 end to end; re-drill any red ones the next morning.
- Days 5-9: One of Path 2 or Path 3 (whichever your loop weighs more).
- Days 10-12: The other half of that path + the greedy/spatial extensions.
- Days 13-14: Path 4 building blocks + skim the appendix table.
4-week deep
- Week 1: Path 1, plus the string and
patterns/sliding_windowextensions. - Week 2: Path 2 (trees → graphs → weighted → MST/flow).
- Week 3: Path 3 (recursion → backtracking → DP → bitmask) + greedy coda.
- Week 4: Path 4 structures, then read every appendix topic against its drill.
Daily maintenance
Once a path is green, keep it warm: just challenge two or three problems a day across paths and track streaks with just challenge-progress. Spaced re-drilling beats one-time completion.