Data Structures & Algorithms
DSA is pattern recognition, not memorization. Each concept is its own lesson: a mental model, the cues that signal it, its variations, and worked problems with full solutions so the pattern becomes automatic.
Start the first lesson →Complexity & Big-O
Reason about time and space the way interviewers do. Watch how different growth rates diverge as input size climbs.
Not started2Arrays & Strings
The substrate for almost everything else: indexing, in-place tricks, and the cost of the operations you take for granted.
Not started3Hashing: Maps & Sets
Trade memory for time. How hash tables turn O(n) scans into O(1) lookups, and the counting/grouping patterns they unlock.
Not started4The Two-Pointer Technique
Turn nested O(n²) scans into a single O(n) sweep. See both pointers move through the array, step by step.
Not started5The Sliding Window
Track a contiguous range as it grows and shrinks. The go-to pattern for subarray and substring problems.
Not started6Prefix Sums & Difference Arrays
Precompute once, answer range queries in O(1). The trick behind subarray-sum problems and range updates.
Not started7Binary Search & the Answer Space
Halve the search space every step. Then learn to binary-search on answers, not just arrays.
Not started8Stacks & Monotonic Stacks
LIFO thinking for matching, parsing, and the monotonic-stack pattern that solves 'next greater element' in one pass.
Not started9Queues & Deques
FIFO processing, the double-ended queue, and the sliding-window-maximum trick that a monotonic deque makes O(n).
Not started10Linked Lists & Fast/Slow Pointers
Pointer surgery: reversal, cycle detection, and finding the middle in one pass. The problems that test careful bookkeeping.
Not started11Recursion & Backtracking
Trust the recursion. Build the decision tree for subsets, permutations, and combinations, and prune it to stay fast.
Not started12Trees & Binary Search Trees
Traversals, the recursive shape of tree problems, and why an in-order walk of a BST comes out sorted.
Not started13Heaps & Priority Queues
Always-get-the-smallest in O(log n). Top-K, merging sorted streams, and the two-heaps running-median pattern.
Not started14Tries (Prefix Trees)
Share prefixes to search a dictionary by character. The structure behind autocomplete and word-search boards.
Not started15Union-Find (Disjoint Sets)
Merge groups and ask 'same set?' in near-constant time. The quiet workhorse of connectivity and cycle problems.
Not started16Graph Traversal: BFS & DFS
Model relationships as nodes and edges, then traverse them. See breadth-first and depth-first exploration diverge.
Not started17Shortest Paths & Topological Sort
Dijkstra for weighted graphs, topological order for dependencies, and how to recognize a graph problem in disguise.
Not started18Greedy Algorithms
Take the locally best choice and prove it stays globally optimal. When greedy works, and how to know it does.
Not started19Interval Patterns
Sort by an endpoint, then sweep. Merging, inserting, and counting overlaps — the shape most scheduling problems take.
Not started20Dynamic Programming I: 1-D
Overlapping subproblems and optimal substructure. Build up from memoized recursion to clean bottom-up tables.
Not started21Dynamic Programming II: Grids & Strings
Two-dimensional state: grid paths, edit distance, and the knapsack family. Define the state, then fill the table.
Not started22Bit Manipulation
Think in bits: masks, XOR tricks, and using an integer as a set. Small, high-leverage tools that show up more than you expect.
Not started23Sorting Foundations
How comparison sorts actually move data. Watch insertion and merge sort rearrange an array in real time.
Not started