Skip to content

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

PathWhat you buildPrerequisitesCore drills
1 · FoundationsScanning a sequence with auxiliary statePython fluency, Big-O basics11
2 · Graphs & TreesTraversal, ordering, weighted/heuristic searchPath 1, data-structure sheet16
3 · DP & BacktrackingRecursion trees, then memoized optimizationPath 1, recursion comfort16
4 · Systems & CS FundamentalsBuilding-block structures + the theory behind themPath 1, system-design sheet14 + appendix

Path 1 · Foundations

Prerequisites: comfortable Python; know array/dict/set costs from the Big-O sheet.

#ProblemWhat it teaches
1arrays/two_sumTrade space for time with a hash map
2arrays/group_anagramsHash a canonical key, not the value
3arrays/product_except_selfPrefix/suffix passes without division
4two_pointers/three_sumSort, then converge two pointers
5two_pointers/container_with_most_waterMove the pointer that can only help
6two_pointers/trapping_rain_waterPointers plus running maxima
7sliding_window/longest_substring_no_repeatVariable window + a seen-set
8sliding_window/min_window_substringWindow with need/have counts
9stacks_queues/valid_parenthesesLIFO matching
10stacks_queues/daily_temperaturesMonotonic stack for "next greater"
11stacks_queues/min_stackDesign: 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_stack

Path 2 · Graphs & Trees

Prerequisites: Path 1 (recursion, stack/queue mechanics); skim the data-structure sheet for adjacency lists, queues, and union-find.

#ProblemWhat it teaches
1trees/max_depthRecursion baseline on a tree
2trees/invert_treeStructural recursion
3trees/level_order_traversalBFS with a queue
4trees/validate_bstDFS carrying bounds / inorder
5trees/trieDesign a multiway prefix tree
6graphs/number_of_islandsGrid DFS/BFS flood fill
7graphs/clone_graphTraversal + a visited map
8graphs/course_scheduleCycle detection in a DAG
9graphs/topological_sortDependency ordering (Kahn / DFS)
10graphs/word_ladderBFS shortest path on an implicit graph
11graphs/dijkstraWeighted shortest path (non-negative)
12graphs/network_delay_timeApply Dijkstra to a real prompt
13graphs/bellman_fordNegative edges, relaxation
14graphs/a_star_searchHeuristic-guided search
15graphs/minimum_spanning_treeGlobal structure + union-find
16graphs/network_flowMax 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_flow

Path 3 · DP & Backtracking

Prerequisites: Path 1; be comfortable writing and tracing recursion.

#ProblemWhat it teaches
1recursion/pow_x_nDivide-and-conquer recursion
2recursion/tower_of_hanoiClassic recursive decomposition
3recursion/generate_parenthesesRecursion under a constraint
4backtracking/subsetsThe choose / explore / unchoose skeleton
5backtracking/permutationsUsed-set bookkeeping
6backtracking/combination_sumReuse elements + pruning
7recursion/letter_combinations_phoneCartesian-product backtracking
8backtracking/n_queensConstraint pruning at scale
9dp/climbing_stairsTurn a recurrence into 1D DP
10dp/coin_changeUnbounded DP, minimize cost
11dp/knapsack0/1 DP, space-optimized
12dp/longest_increasing_subseqDP + binary search
13dp/longest_common_subseq2D DP over two strings
14dp/edit_distance2D DP with three transitions
15dp/constraint_satisfactionDP under explicit constraints
16dp/traveling_salesman_dpBitmask 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_dp

Path 4 · Systems & CS Fundamentals

Prerequisites: Path 1; comfortable reading code; skim the system-design and interview-day sheets.

#ProblemWhat it teaches
1searching/binary_searchLoop-invariant discipline
2searching/find_minimum_rotatedBinary search on a pivot
3searching/search_rotated_arrayBinary search on transformed input
4sorting/quickselectPartition-based selection (expected O(n))
5sorting/merge_sort_inversionsDivide-and-conquer + counting
6heaps/kth_largestHeap of size k
7heaps/merge_k_sorted_listsk-way merge with a heap
8heaps/task_schedulerHeap + greedy scheduling
9linked_lists/reverse_linked_listPointer surgery
10linked_lists/merge_two_sortedMerge on linked nodes
11linked_lists/lru_cacheDesign: hash map + doubly linked list
12bit_manipulation/single_numberXOR identities
13bit_manipulation/counting_bitsDP over bit patterns
14bit_manipulation/reverse_bitsFixed-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_bits

Appendix 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 topicRead it alongside
Hash Table Internalsarrays/two_sum, arrays/group_anagrams, linked_lists/lru_cache
Amortized Analysisstacks_queues/daily_temperatures, sorting/quickselect, dynamic arrays
Concurrency & Parallelism Primitivesheaps/task_scheduler
Recursion to Iteration Conversionrecursion/tower_of_hanoi, recursion/pow_x_n, recursion/flatten_nested_list
Fixed-Width & Numeric Pitfallsbit_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_window extensions.
  • 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.

This page lives in git. Anyone can propose an edit. Edit this page View source

A reading surface for the DSA study packet. Content is tracked in git; every page links to its source.