Learning Roadmap

A progression where each stage builds on the previous one. Mark topics as you go — progress is stored locally in your browser.

0 / 119 topics masteredNot started 119Learning 0Practicing 0Mastered 0
  1. 1

    Complexity

    Use the **Complexity Explorer** to get a feel for how `O(1)`, `O(log n)`, `O(n)`, `O(n log n)`, `O(n^2)` and `O(2^n)` scale. Before moving on, you should be able to read constraints like `n <= 10^5` and say which complexities are acceptable, and to derive the complexity of a nested loop or a halving recursion.

    Open the Complexity Explorer →
  2. 2

    Arrays & Strings

    0/10

    Learn how contiguous memory gives `O(1)` indexing, why appending to a dynamic array is amortized `O(1)`, and how strings and matrices are arrays in disguise. You should be able to write the classic sorts from memory, explain their stability and complexity, and pick counting/radix sort when keys are small integers.

  3. 3

    Hashing

    0/6

    Understand how a hash function plus a collision strategy gives expected `O(1)` insert and lookup, and what happens when the load factor grows. You should reflexively replace "have I seen this before" scans with a set, and solve two-sum, anagram grouping and frequency counting without hesitation.

  4. 4

    Linked Lists

    0/6

    Master pointer manipulation with `prev`/`curr`/`next` and a dummy head, and know when a list beats an array (O(1) splice at a known node) and when it does not (no random access). You should be able to reverse, merge, find the middle and detect a cycle in one pass and constant space.

  5. 5

    Stack & Queue

    0/6

    LIFO and FIFO are the two orders every later algorithm builds on: DFS and expression parsing use a stack, BFS uses a queue. You should be able to implement both on arrays and lists, solve bracket matching and min-stack, and use a monotonic stack for next-greater-element problems.

  6. 6

    Binary Search

    0/5

    Beyond finding a value in a sorted array, learn to binary search on any monotonic predicate, including the answer space of an optimization problem. You should be able to write both templates (`lo <= hi` and `lo < hi`) without off-by-one bugs and solve rotated array and "minimum speed" style problems.

  7. 7

    Two Pointers

    0/4

    Turn `O(n^2)` pair scans into `O(n)` by exploiting order: opposite ends for sorted sums and palindromes, same direction for in-place compaction and partitioning. You should be able to justify which pointer moves and why the skipped pairs cannot be the answer.

  8. 8

    Sliding Window

    0/7

    Solve contiguous subarray and substring problems by maintaining a window that grows and shrinks monotonically, with a frequency map when characters matter. Before moving on, make sure you can state the window invariant and handle "at most k" versus "exactly k" correctly.

  9. 9

    Recursion

    0/5

    Get comfortable trusting the recursive call: define the base case, make progress, and combine. You should be able to trace the call stack for a small input, convert simple recursion to iteration, and explain why divide-and-conquer recurrences give `O(n log n)`.

  10. 10

    Trees / BST

    0/6

    Learn the three depth-first orders and level order, and how the BST invariant makes inorder traversal sorted. You should be able to validate a BST, find a lowest common ancestor, compute heights and path sums recursively, and explain why balancing (AVL / red-black) keeps operations `O(log n)`.

  11. 11

    Heap

    0/6

    Understand the array-backed binary heap, sift-up and sift-down, and `O(n)` heapify. You should be able to implement a priority queue, solve top-k and k-way merge in `O(n log k)`, keep a running median with two heaps, and know when quickselect is the better choice.

  12. 12

    Graphs

    0/10

    Represent graphs with adjacency lists, then own BFS for shortest unweighted paths and DFS for components and cycles. You should be able to run Dijkstra with a heap, explain why it fails on negative edges and when Bellman-Ford or Floyd-Warshall applies, and topologically sort a DAG both ways.

  13. 13

    Backtracking

    0/7

    Enumerate subsets, permutations and combinations with choose / recurse / un-choose, and prune early. You should be able to write N-Queens and word search cleanly, handle duplicates in the input, and estimate the size of the search tree from the constraints.

  14. 14

    Greedy

    0/7

    Learn to spot when a locally optimal choice is globally safe, and to argue it with an exchange argument. You should be able to solve interval scheduling by earliest finish, merge intervals after sorting, and recognize when a greedy attempt fails and DP is required.

  15. 15

    Dynamic Programming

    0/10

    Define a state, write the recurrence, then decide between memoization and tabulation. You should be able to derive the 1D, grid, knapsack and subsequence families from scratch, reconstruct an optimal solution from the table, and reduce space when only the previous row is needed.

  16. 16

    Trie

    0/4

    Store strings character by character so prefix queries cost `O(L)` regardless of dictionary size. You should be able to implement insert / search / startsWith, use a trie to prune grid DFS in Word Search II, and know when a hash set of prefixes is simpler.

  17. 17

    Union-Find

    0/4

    Implement disjoint sets with path compression and union by rank, and understand why the amortized cost is effectively constant. You should be able to count components as edges arrive, detect the redundant edge in a graph, and run Kruskal's MST on top of it.

  18. 18

    Segment/Fenwick Trees

    0/6

    Move from static prefix sums to structures that support updates: Fenwick trees for sums, segment trees for any associative operation, sparse tables for static idempotent queries. You should be able to build each, explain the `O(log n)` bound, and choose between them from the problem statement.

  19. 19

    Advanced Graph/String Algorithms

    0/10

    Round out the toolkit with SCCs, bridges and articulation points via DFS low-link, Euler paths, bipartite checks, and linear-time string matching. You should be able to explain the failure function of KMP, the low-link invariant of Tarjan, and pick 0-1 BFS or A* over Dijkstra when the graph allows it.