The curated path
Everything a CS degree teaches about DSA, without the overwhelm
One concept at a time, start to finish: learn it, drill it, pass the test, then solve real problems with the guidance fading step by step, until you can spot the pattern in a problem you have never seen. Learn any concept for free. Practice and testing unlock with premium.
New here? Start at the beginning.
The path is ordered. Begin with Big-O Notation and work straight down, one module at a time.
You’re not signed in. Your progress here won’t be saved.
1Big-O Notation
Given a short piece of code, state its time complexity and explain why, out loud, without guessing.
3 steps
Big-O Notation
Given a short piece of code, state its time complexity and explain why, out loud, without guessing.
2Hash Maps
Spot when a problem needs lookup by key, and explain why a hash map turns an O(n) search into an O(1) lookup.
12 steps
Hash Maps
Spot when a problem needs lookup by key, and explain why a hash map turns an O(n) search into an O(1) lookup.
- LessonHash MapsFree
- PracticeApplied drillsFree
- TestGraded testFree
- ProblemTwo SumEasy · Hash MapFree
- ProblemContains DuplicateEasy · SetFree
- ProblemValid AnagramEasy · Frequency MapFree
- ProblemRansom NoteEasy · Hash MapPremium
- ProblemFirst Unique Character in a StringEasy · Frequency MapPremium
- ProblemGroup AnagramsMedium · Hash MapPremium
- ProblemTop K Frequent ElementsMedium · Frequency MapPremium
- ProblemLongest Consecutive SequenceMedium · SetPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelFree
3Two Pointers
Spot when two indices walking an array can replace a nested loop, and tell whether they move toward each other or in the same direction.
12 steps
Two Pointers
Spot when two indices walking an array can replace a nested loop, and tell whether they move toward each other or in the same direction.
- LessonTwo PointersFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemValid PalindromeEasy · Two PointersPremium
- ProblemSquares of a Sorted ArrayEasy · Two PointersPremium
- ProblemTwo Sum IIMedium · Two PointersPremium
- ProblemMove ZeroesEasy · Two PointersPremium
- ProblemContainer With Most WaterMedium · Two PointersPremium
- Problem3SumMedium · Two PointersPremium
- ProblemLongest Palindromic SubstringMedium · Two PointersPremium
- ProblemTrapping Rain WaterHard · Two PointersPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
4Sliding Window
Recognize a contiguous-subarray problem and maintain a window that grows and shrinks in one pass, instead of re-checking every subarray.
11 steps
Sliding Window
Recognize a contiguous-subarray problem and maintain a window that grows and shrinks in one pass, instead of re-checking every subarray.
- LessonSliding WindowFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemMaximum Average Subarray IEasy · Sliding WindowPremium
- ProblemMinimum Size Subarray SumMedium · Sliding WindowPremium
- ProblemLongest Substring Without Repeating CharactersMedium · Sliding WindowPremium
- ProblemFruit Into BasketsMedium · Sliding WindowPremium
- ProblemPermutation in StringMedium · Sliding WindowPremium
- ProblemFind All Anagrams in a StringMedium · Sliding WindowPremium
- ProblemMinimum Window SubstringHard · Sliding WindowPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
5Prefix Sum
Precompute cumulative sums so any range total is O(1), and combine prefix sums with a hash map to count subarrays.
9 steps
Prefix Sum
Precompute cumulative sums so any range total is O(1), and combine prefix sums with a hash map to count subarrays.
- LessonPrefix SumFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemRunning Sum of 1d ArrayEasy · Prefix SumPremium
- ProblemRange Sum Query - ImmutableEasy · Prefix SumPremium
- ProblemFind Pivot IndexEasy · Prefix SumPremium
- ProblemProduct of Array Except SelfMedium · Prefix SumPremium
- ProblemSubarray Sum Equals KMedium · Prefix SumPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
6Recursion
Read and write a simple recursive function by naming its base case and recursive case, and trace how the call stack unwinds.
12 steps
Recursion
Read and write a simple recursive function by naming its base case and recursive case, and trace how the call stack unwinds.
- LessonRecursionFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemSubsetsMedium · BacktrackingPremium
- ProblemCombinationsMedium · BacktrackingPremium
- ProblemPermutationsMedium · BacktrackingPremium
- ProblemCombination SumMedium · BacktrackingPremium
- ProblemGenerate ParenthesesMedium · BacktrackingPremium
- ProblemLetter Combinations of a Phone NumberMedium · BacktrackingPremium
- ProblemPalindrome PartitioningMedium · BacktrackingPremium
- ProblemWord SearchHard · BacktrackingPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
7Binary Search
Explain why binary search needs sorted input, how halving gives O(log n), and the off-by-one traps that break it.
12 steps
Binary Search
Explain why binary search needs sorted input, how halving gives O(log n), and the off-by-one traps that break it.
- LessonBinary SearchFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemBinary SearchEasy · Binary SearchPremium
- ProblemSearch Insert PositionEasy · Binary SearchPremium
- ProblemFirst Bad VersionEasy · Binary SearchPremium
- ProblemKoko Eating BananasMedium · Binary SearchPremium
- ProblemFind Minimum in Rotated Sorted ArrayMedium · Binary SearchPremium
- ProblemSearch in Rotated Sorted ArrayMedium · Binary SearchPremium
- ProblemFind Peak ElementMedium · Binary SearchPremium
- ProblemSearch a 2D MatrixMedium · Binary SearchPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
8Linked Lists
Explain how nodes and pointers form a list, why reaching an element is O(n) but inserting at a known spot is O(1), and when to pick one over an array.
12 steps
Linked Lists
Explain how nodes and pointers form a list, why reaching an element is O(n) but inserting at a known spot is O(1), and when to pick one over an array.
- LessonLinked ListsFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemReverse Linked ListEasy · Linked ListPremium
- ProblemMiddle of the Linked ListEasy · Linked ListPremium
- ProblemLinked List CycleEasy · Linked ListPremium
- ProblemMerge Two Sorted ListsEasy · Linked ListPremium
- ProblemRemove Nth Node From End of ListMedium · Linked ListPremium
- ProblemAdd Two NumbersMedium · Linked ListPremium
- ProblemReorder ListMedium · Linked ListPremium
- ProblemFind the Duplicate NumberMedium · Fast and Slow PointersPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
9Stacks and Queues
Describe LIFO and FIFO ordering, the core operations of each, and recognize which problems call for a stack versus a queue.
12 steps
Stacks and Queues
Describe LIFO and FIFO ordering, the core operations of each, and recognize which problems call for a stack versus a queue.
- LessonStacks and QueuesFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemValid ParenthesesEasy · StackPremium
- ProblemBaseball GameEasy · StackPremium
- ProblemMin StackMedium · StackPremium
- ProblemEvaluate Reverse Polish NotationMedium · StackPremium
- ProblemDaily TemperaturesMedium · StackPremium
- ProblemNext Greater Element IIMedium · StackPremium
- ProblemDecode StringMedium · StackPremium
- ProblemLargest Rectangle in HistogramHard · StackPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
10Trees and Binary Search Trees
Describe a binary tree, the BST ordering property, what in-order traversal yields, and why a balanced BST searches in O(log n) while an unbalanced one degrades to O(n).
12 steps
Trees and Binary Search Trees
Describe a binary tree, the BST ordering property, what in-order traversal yields, and why a balanced BST searches in O(log n) while an unbalanced one degrades to O(n).
- LessonTrees and Binary Search TreesFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemMaximum Depth of Binary TreeEasy · Tree TraversalPremium
- ProblemInvert Binary TreeEasy · Tree TraversalPremium
- ProblemSame TreeEasy · Tree TraversalPremium
- ProblemSymmetric TreeEasy · Tree TraversalPremium
- ProblemBalanced Binary TreeEasy · Tree TraversalPremium
- ProblemBinary Tree Level Order TraversalMedium · Tree TraversalPremium
- ProblemValidate Binary Search TreeMedium · Tree TraversalPremium
- ProblemLowest Common Ancestor of a Binary TreeMedium · Tree TraversalPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
11Heaps and Priority Queues
Explain why a heap gives O(1) access to the min or max with O(log n) inserts and removals, why it is not fully sorted, and when to reach for one.
12 steps
Heaps and Priority Queues
Explain why a heap gives O(1) access to the min or max with O(log n) inserts and removals, why it is not fully sorted, and when to reach for one.
- LessonHeaps and Priority QueuesFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemKth Largest Element in an ArrayMedium · Heap / Priority QueuePremium
- ProblemK Closest Points to OriginMedium · Heap / Priority QueuePremium
- ProblemTop K Frequent ElementsMedium · Frequency MapPremium
- ProblemTask SchedulerMedium · GreedyPremium
- ProblemFind K Pairs with Smallest SumsMedium · Heap / Priority QueuePremium
- ProblemMerge K Sorted ListsHard · K-Way MergePremium
- ProblemFind Median from Data StreamHard · Two HeapsPremium
- ProblemIPOHard · Two HeapsPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
12Union-Find
Maintain groups under merges and answer 'are these two connected?' in near-constant time, and tell when union-find beats a fresh BFS or DFS.
9 steps
Union-Find
Maintain groups under merges and answer 'are these two connected?' in near-constant time, and tell when union-find beats a fresh BFS or DFS.
- LessonUnion-FindFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemNumber of Connected Components in an Undirected GraphMedium · Union-FindPremium
- ProblemRedundant ConnectionMedium · Union-FindPremium
- ProblemGraph Valid TreeMedium · Union-FindPremium
- ProblemAccounts MergeMedium · Union-FindPremium
- ProblemNumber of Islands IIHard · Union-FindPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
13Graphs (BFS and DFS)
Describe nodes and edges, pick between an adjacency list and matrix, and choose BFS or DFS based on what the problem needs.
12 steps
Graphs (BFS and DFS)
Describe nodes and edges, pick between an adjacency list and matrix, and choose BFS or DFS based on what the problem needs.
- LessonGraphs (BFS and DFS)Free
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemFlood FillEasy · Graph TraversalPremium
- ProblemNumber of IslandsMedium · Graph TraversalPremium
- ProblemMax Area of IslandMedium · Graph TraversalPremium
- ProblemNumber of ProvincesMedium · Graph TraversalPremium
- ProblemClone GraphMedium · Graph TraversalPremium
- ProblemRotting OrangesMedium · Matrix TraversalPremium
- ProblemCourse ScheduleMedium · Topological SortPremium
- ProblemPacific Atlantic Water FlowMedium · Graph TraversalPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
14Greedy
Decide when taking the locally-best choice at each step is provably safe, and recognize when it isn't and you need dynamic programming instead.
10 steps
Greedy
Decide when taking the locally-best choice at each step is provably safe, and recognize when it isn't and you need dynamic programming instead.
- LessonGreedyFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemBest Time to Buy and Sell Stock IIEasy · GreedyPremium
- ProblemJump GameMedium · GreedyPremium
- ProblemJump Game IIMedium · GreedyPremium
- ProblemGas StationMedium · GreedyPremium
- ProblemTask SchedulerMedium · GreedyPremium
- ProblemMeeting Rooms IIMedium · GreedyPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
15Sorting
Explain why naive sorts are O(n^2), the divide-and-conquer idea that gets merge sort to O(n log n), and what sorted data unlocks.
12 steps
Sorting
Explain why naive sorts are O(n^2), the divide-and-conquer idea that gets merge sort to O(n log n), and what sorted data unlocks.
- LessonSortingFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemSort an ArrayMedium · Sorting AlgorithmsPremium
- ProblemMeeting RoomsEasy · GreedyPremium
- ProblemMerge IntervalsMedium · IntervalsPremium
- ProblemNon-Overlapping IntervalsMedium · GreedyPremium
- ProblemSquares of a Sorted ArrayEasy · Two PointersPremium
- ProblemFind All Numbers Disappeared in an ArrayEasy · Cyclic SortPremium
- ProblemFind All Duplicates in an ArrayMedium · Cyclic SortPremium
- ProblemFirst Missing PositiveHard · Cyclic SortPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
16Dynamic Programming
Recognize overlapping subproblems, use memoization to compute each subproblem once, and tell when a problem is a DP candidate.
12 steps
Dynamic Programming
Recognize overlapping subproblems, use memoization to compute each subproblem once, and tell when a problem is a DP candidate.
- LessonDynamic ProgrammingFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemClimbing StairsEasy · Dynamic ProgrammingPremium
- ProblemMin Cost Climbing StairsEasy · Dynamic ProgrammingPremium
- ProblemHouse RobberMedium · Dynamic ProgrammingPremium
- ProblemCoin ChangeMedium · Dynamic ProgrammingPremium
- ProblemUnique PathsMedium · Dynamic ProgrammingPremium
- ProblemLongest Increasing SubsequenceMedium · Dynamic ProgrammingPremium
- ProblemWord BreakMedium · Dynamic ProgrammingPremium
- ProblemEdit DistanceHard · Dynamic ProgrammingPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium
17Bit Manipulation
Use the bitwise operators (especially XOR) to solve specific structured problems in O(1) space, and recognize when bits are the wrong tool.
11 steps
Bit Manipulation
Use the bitwise operators (especially XOR) to solve specific structured problems in O(1) space, and recognize when bits are the wrong tool.
- LessonBit ManipulationFree
- PracticeApplied drillsPremium
- TestGraded testPremium
- ProblemNumber of 1 BitsEasy · Bit ManipulationPremium
- ProblemSingle NumberEasy · Bit ManipulationPremium
- ProblemMissing NumberEasy · Bit ManipulationPremium
- ProblemCounting BitsEasy · Bit ManipulationPremium
- ProblemReverse BitsEasy · Bit ManipulationPremium
- ProblemSingle Number IIMedium · Bit ManipulationPremium
- ProblemMaximum Product of Word LengthsMedium · Bit ManipulationPremium
- CapstoneRecognize it cold3 cold reads · no pattern labelPremium