Learning roadmap
Roadmap
Work from the top down. A line means a prerequisite: finish the node above and the one below comes easier. Click a node to see the lessons inside it.
Overall progress
0/93
Suggested next
Big-O Notation Time and space complexityWhat's in each node
In learning order · click a node in the map to jump to its cardComplexity and recursion
Foundations
0/3 learned
- 1Big-O NotationNextTime and space complexity
- 2RecursionRecursion
- 3Amortized AnalysisAmortised analysis
Prerequisites
This is the starting pointLeads to
Access by index and by key
Arrays & Hashing
0/5 learned
- 1Array & Dynamic ArrayArrays and dynamic arrays
- 2Prefix SumPrefix sums
- 3Hash TableHash tables
- 4Hash Set / Map PatternsCounting and deduplication
- 5Matrix2D arrays
Prerequisites
Leads to
LIFO, FIFO and monotonic variants
Stack & Queue
0/4 learned
- 1StackStacks
- 2Queue & DequeQueues and deques
- 3Monotonic StackMonotonic stacks
- 4Monotonic QueueMonotonic queues
Prerequisites
Leads to
Comparison and counting sorts
Sorting
0/9 learned
- 1Bubble SortBubble sort
- 2Selection SortSelection sort
- 3Insertion SortInsertion sort
- 4Merge SortMerge sort
- 5Quick SortQuicksort
- 6Heap SortHeapsort
- 7Counting SortCounting sort
- 8Radix / Bucket SortRadix and bucket sort
- 9Sorting Lower BoundThe comparison sort lower bound
Prerequisites
Leads to
Linear and binary search
Binary Search
0/3 learned
- 1Linear SearchLinear search
- 2Binary SearchBinary search
- 3Binary Search on AnswerBinary search on the answer
Prerequisites
Leads to
A moving range over a sequence
Sliding Window
0/1 learned
Prerequisites
Leads to
Nodes joined by pointers
Linked List
0/5 learned
- 1Singly Linked ListSingly linked lists
- 2Doubly Linked ListDoubly linked lists
- 3Reverse Linked ListReversing a list
- 4Fast & Slow PointersFast and slow pointers
- 5Merge ListsMerging lists
Prerequisites
Leads to
Split, solve, combine
Divide & Conquer
0/4 learned
- 1Master TheoremSolving recurrences
- 2Maximum SubarrayMaximum subarray
- 3Fast ExponentiationFast exponentiation
- 4Count InversionsCounting inversions
Prerequisites
Leads to
Binary trees and BSTs
Trees
0/4 learned
- 1Binary Tree BasicsBinary tree basics
- 2TraversalPre-, in-, post- and level-order traversal
- 3BSTBinary search trees
- 4Balanced BSTHow balancing works
Prerequisites
Leads to
Always know the smallest
Heap / Priority Queue
0/3 learned
Prerequisites
Leads to
Try, undo, try again
Backtracking
0/5 learned
- 1SubsetsSubsets
- 2PermutationsPermutations
- 3Combinations & Combination SumCombinations and pruning
- 4N-QueensN-queens
- 5Word SearchBacktracking on a grid
Prerequisites
Leads to
Range query structures
Segment & Fenwick Tree
0/2 learned
Prerequisites
Leads to
End of the roadmapString matching algorithms
Strings
0/5 learned
- 1String HashingString hashing
- 2Rabin-KarpRolling hash matching
- 3KMPPrefix-function matching
- 4Z-AlgorithmThe Z function
- 5ManacherLongest palindrome
Prerequisites
Leads to
End of the roadmapTake the best choice now
Greedy
0/5 learned
- 1Greedy PrinciplesWhen greedy is correct
- 2Coin Change (Greedy)Making change
- 3Interval SchedulingInterval scheduling
- 4Jump GameJump game
- 5Huffman CodingHuffman coding
Prerequisites
Leads to
Representing and traversing graphs
Graphs
0/8 learned
- 1Adjacency List / MatrixAdjacency lists and matrices
- 2BFSBreadth-first search
- 3DFSDepth-first search
- 4Grid as GraphGrids as graphs
- 5Cycle DetectionCycle detection
- 6Topological SortTopological sort
- 7Bipartite CheckBipartite checking
- 8Union-FindUnion-find
Prerequisites
Leads to
DP over a single index
1-D Dynamic Programming
0/5 learned
- 1Memoization & TabulationMemoisation and tabulation
- 21-D DPOne-dimensional DP
- 30/1 Knapsack0/1 knapsack
- 4Unbounded KnapsackUnbounded knapsack
- 5LISLongest increasing subsequence
Prerequisites
Leads to
Shortest paths and spanning trees
Advanced Graphs
0/5 learned
- 1DijkstraSingle-source shortest paths
- 2Bellman-FordShortest paths with negative weights
- 3Floyd-WarshallAll-pairs shortest paths
- 4Shortest Path in DAGShortest paths on a DAG
- 5MST: Kruskal & PrimMinimum spanning trees
Prerequisites
Leads to
End of the roadmapTwo-dimensional and advanced DP
2-D Dynamic Programming
0/6 learned
- 1LCSLongest common subsequence
- 2Edit DistanceEdit distance
- 3Grid DPPaths on a grid
- 4Interval DPInterval DP
- 5Bitmask DPBitmask DP
- 6Tree DPDP on trees
Prerequisites
Leads to
Working with bits directly
Bit Manipulation
0/4 learned
- 1Bitwise BasicsThe basic operations
- 2XOR TricksXOR tricks
- 3Counting BitsCounting bits
- 4Subset EnumerationEnumerating subsets with bits
Prerequisites
Leads to
GCD, primes and modular arithmetic
Math & Number Theory
0/4 learned
- 1GCD & LCMGreatest common divisor
- 2Sieve of EratosthenesPrime sieves
- 3Modular ArithmeticModular arithmetic
- 4CombinatoricsCounting
Prerequisites
Leads to
End of the roadmap