Learning Paths
These four sequences order existing problems so each one reuses an idea from the previous one. The decision tree helps you identify a pattern; this page tells you what to learn next.
Use the same loop for every problem
Start from a table entry with your preferred reasoning vocabulary:
just practice-start reacto arrays two_sum
# write source comments, save, continue, implement, and add tests
just practice-next
just practice-test
just practice-finish "one fix"
You can use /reacto arrays two_sum in Copilot Chat instead. Replace reacto with clarp, umpire, or comments without changing the save-and-continue loop.
Choose a path
| Path | What you build | Prerequisites | Core problems |
|---|---|---|---|
| 1: Foundations | Scanning a sequence with auxiliary state | Python fluency, Big-O basics | 11 |
| 2: Graphs & Trees | Traversal, ordering, weighted and 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 and their theory | Path 1, system-design sheet | 15 plus appendix |
Start with Foundations. Paths 2 and 3 can follow in either order. Use Path 4 after the basic sequence patterns feel familiar.
Path 1: Foundations
Carry just enough state through one pass: first a map, then pointers, a window, and a stack.
| # | 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 plus 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 | O(1) minimum with an auxiliary stack |
Extensions: strings/valid_anagram, strings/valid_palindrome, and arrays/top_k_frequent.
Path 2: Graphs & Trees
Master traversal on trees, generalize it to graphs, then add ordering, weights, heuristics, and global structure.
| # | 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 or inorder state |
| 5 | trees/trie | Design a multiway prefix tree |
| 6 | graphs/number_of_islands | Grid DFS/BFS flood fill |
| 7 | graphs/clone_graph | Traversal plus a visited map |
| 8 | graphs/course_schedule | Cycle detection in a DAG |
| 9 | graphs/topological_sort | Dependency ordering with Kahn or DFS |
| 10 | graphs/word_ladder | BFS shortest path on an implicit graph |
| 11 | graphs/dijkstra | Weighted shortest path with non-negative edges |
| 12 | graphs/network_delay_time | Apply Dijkstra to a prompt |
| 13 | graphs/bellman_ford | Negative edges and relaxation |
| 14 | graphs/a_star_search | Heuristic-guided search |
| 15 | graphs/minimum_spanning_tree | Global structure plus union-find |
| 16 | graphs/network_flow | Max flow and min cut |
Spatial extensions: graphs/geohash_grid and graphs/kd_tree.
Path 3: DP & Backtracking
Trace the recursion tree first. Then recognize repeated subproblems and cache them.
| # | Problem | What it teaches |
|---|---|---|
| 1 | recursion/pow_x_n | Divide-and-conquer recursion |
| 2 | recursion/tower_of_hanoi | Recursive decomposition |
| 3 | recursion/generate_parentheses | Recursion under a constraint |
| 4 | backtracking/subsets | Choose, explore, unchoose |
| 5 | backtracking/permutations | Used-set bookkeeping |
| 6 | backtracking/combination_sum | Reuse elements plus 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 that minimizes cost |
| 11 | dp/knapsack | 0/1 DP with space optimization |
| 12 | dp/longest_increasing_subseq | DP plus 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 |
Contrast DP with greedy choices in greedy/merge_intervals, greedy/jump_game, and greedy/interval_scheduling.
Path 4: Systems & CS Fundamentals
Build common structures, then connect them to the theory that explains their costs and failure modes.
| # | 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 expected O(n) selection |
| 5 | sorting/merge_sort_inversions | Divide-and-conquer plus 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 plus greedy scheduling |
| 9 | linked_lists/reverse_linked_list | Pointer updates |
| 10 | linked_lists/merge_two_sorted | Merge on linked nodes |
| 11 | linked_lists/lru_cache | Hash map plus 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 |
| 15 | math/sieve_of_eratosthenes | Precompute primes once, amortize over many queries |
Appendix reading
| 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 |
Pace the work
- Two weeks: finish Foundations, choose Path 2 or 3, then sample the other and Path 4.
- Four weeks: give each path one week and use extensions for weak signals.
- Maintenance: let
just practice-start reactodraw due problems across topics.
Move forward when you can explain and trace the pattern, not when every row is checked. Revisit due problems through the queue. Use full algorithm pages after the rep when you need a worked reference.