Skip to content

The roadmap

20 topics and 422 problems, in the order we recommend. Each topic builds on the ones before it: recursion before trees, trees before graphs, and graphs before dynamic programming.

  1. Topic 1

    Foundations

    Big-O, complexity analysis and the basic math every later topic leans on.

    5 problems · 3 Easy · 2 Medium · 0 Hard

    Complexity Analysis · Simulation · Digit Manipulation · Sieve

  2. Topic 2

    Arrays, Strings & Hashing

    Hash maps, frequency counting and prefix sums: the tools behind a third of all interview questions.

    35 problems · 13 Easy · 17 Medium · 5 Hard

    Hash Map Lookup · Hash Set · Frequency Count · Prefix Sum

  3. Topic 3

    Two Pointers

    Two indices moving through data to replace nested loops with a single pass.

    20 problems · 8 Easy · 11 Medium · 1 Hard

    Opposite Ends · Same Direction (Read/Write) · Sort + Two Pointers · Dutch National Flag

  4. Topic 4

    Sliding Window

    Maintain a window over a sequence and update it incrementally instead of recomputing.

    20 problems · 4 Easy · 12 Medium · 4 Hard

    Fixed-size Window · Variable Window (Shrink When Invalid) · Window + Frequency Map · Exactly K = AtMost(K) − AtMost(K−1)

  5. Topic 5

    Stack & Monotonic Stack

    Last-in-first-out processing for parsing, undo-style logic and 'next greater' questions.

    25 problems · 7 Easy · 14 Medium · 4 Hard

    Matching / Parsing · Stack Simulation · Monotonic Stack · Min/Aux Stack

  6. Topic 6

    Binary Search

    Halve the search space each step, on arrays and, more powerfully, on the answer itself.

    25 problems · 6 Easy · 14 Medium · 5 Hard

    Classic Binary Search · Lower / Upper Bound · Rotated Sorted Array · Binary Search on Answer

  7. Topic 7

    Linked List

    Pointer manipulation: reversal, fast & slow pointers, merging and cache design.

    25 problems · 8 Easy · 13 Medium · 4 Hard

    Dummy Head · In-place Reversal · Fast & Slow Pointers · Merge Lists

  8. Topic 8

    Recursion & Backtracking

    Think recursively, then explore every choice and undo it: subsets, permutations and search.

    25 problems · 3 Easy · 17 Medium · 5 Hard

    Recursion Basics · Divide & Conquer · Subsets (Include / Exclude) · Permutations

  9. Topic 9

    Binary Trees

    Recursive DFS, level-order BFS, path problems, construction and lowest common ancestors.

    35 problems · 13 Easy · 18 Medium · 4 Hard

    DFS Traversals (Pre / In / Post) · BFS Level Order · Bottom-up DFS (Return Values) · Top-down DFS (Carry State)

  10. Topic 10

    Binary Search Trees

    Use the ordering invariant: inorder is sorted, and every step discards a subtree.

    15 problems · 5 Easy · 8 Medium · 2 Hard

    BST Invariant (Bounds) · Inorder = Sorted · BST Insert / Delete · Ordered Set

  11. Topic 11

    Heaps / Priority Queue

    Always know the smallest or largest item in O(1): top-K, k-way merge, scheduling and running medians.

    20 problems · 4 Easy · 12 Medium · 4 Hard

    Top-K with a Size-K Heap · K-way Merge · Two Heaps · Greedy Scheduling with a Heap

  12. Topic 12

    Tries

    Prefix trees for autocomplete, dictionary search and bitwise XOR tricks.

    10 problems · 0 Easy · 8 Medium · 2 Hard

    Prefix Tree · Trie + DFS (Wildcards) · Trie + Backtracking · Bitwise Trie

  13. Topic 13

    Graphs (BFS, DFS, Grid)

    Model problems as nodes and edges; traverse with DFS and BFS, on explicit graphs and on grids.

    35 problems · 5 Easy · 25 Medium · 5 Hard

    Grid DFS / Flood Fill · BFS Shortest Path (Unweighted) · Multi-source BFS · Connected Components

  14. Topic 14

    Advanced Graphs

    Topological sort, Union-Find, Dijkstra, Bellman-Ford, Floyd-Warshall and minimum spanning trees.

    20 problems · 0 Easy · 14 Medium · 6 Hard

    Topological Sort (Kahn / DFS) · Union-Find (Disjoint Set Union) · Dijkstra · Bellman-Ford / BFS with Stops

  15. Topic 15

    Greedy

    Make the locally best choice, and learn to prove it is globally optimal.

    20 problems · 5 Easy · 12 Medium · 3 Hard

    Sort + Greedy · Kadane's Algorithm · Reachability (Jump Game) · Exchange Argument

  16. Topic 16

    Intervals

    Sort by start or end, then merge, insert, count overlaps or sweep over events.

    12 problems · 2 Easy · 8 Medium · 2 Hard

    Sort + Merge · Insert into Sorted Intervals · Sort by End (Greedy) · Sweep Line / Difference Array

  17. Topic 17

    Dynamic Programming – 1D

    Recursion plus memory: define a state, write the recurrence, fill the table.

    25 problems · 4 Easy · 17 Medium · 4 Hard

    Fibonacci-style Recurrence · Take / Skip (House Robber) · 0/1 Knapsack · Unbounded Knapsack

  18. Topic 18

    Dynamic Programming – 2D & Advanced

    Grids, two-string DP, stock state machines, interval DP and bitmask DP.

    30 problems · 0 Easy · 19 Medium · 11 Hard

    Grid Paths · Two-string DP (LCS / Edit Distance) · State Machine DP · Interval DP

  19. Topic 19

    Bit Manipulation

    XOR tricks, masks and counting bits: short, fast solutions that impress.

    10 problems · 6 Easy · 4 Medium · 0 Hard

    XOR Cancellation · Bit Counting · Masks & Shifts · Bitwise Arithmetic

  20. Topic 20

    Math & Geometry

    Matrix manipulation, number tricks and coordinate geometry that show up in interviews.

    10 problems · 3 Easy · 6 Medium · 1 Hard

    Matrix Rotation / Traversal · In-place Marking · Digit & String Arithmetic · Cycle Detection on Numbers