Contents
Six parts, 23 chapters. Read them in order, or start withthe memory hierarchy, which is the one that changes how the rest of them read.
Part I · Foundations
- 1Introduction to Data Structures and Algorithms
What a data structure actually is, and why the choice of one decides the shape of everything above it.
- 2Time and Space Complexity AnalysisInteractive
Big-O, and the two things it hides — the constant factor and the memory hierarchy — that decide which O(n) actually wins. Measured live.
Part II · Linear Structures
- 3Arrays and StringsInteractive
The structure the hardware loves: why contiguity makes arrays fast, how layout (AoS vs SoA) decides their speed, and where columnar databases take it. Measured live.
- 4Concurrency for Data StructuresInteractive
Locks, atomics, and what "thread-safe" costs you — with the data race and its fix animated step by step.
- 5Memory Hierarchy and PerformanceInteractive
Cache lines, prefetchers, and the 100× that Big-O cannot see. Measured live, in your browser.
- 6Linked ListsInteractive
O(1) insertion — bought by giving up the contiguity that made arrays fast, a trade real hardware rarely rewards. Measured live.
- 7Stacks and QueuesInteractive
The two most useful restrictions on a sequence — LIFO and FIFO — running everything from your call stack to message brokers.
Part III · Non-Linear Structures
- 8Trees and Binary TreesInteractive
Ordering and O(log n) at once — the thing hash tables threw away — plus why databases don’t actually use binary trees.
- 9String Search Algorithms
KMP, Boyer-Moore, Rabin-Karp — and why the naive scan often wins in practice.
- 10Recursion and Backtracking
The call stack as a data structure, and pruning as the only thing that makes search tractable.
- 11Sorting Algorithms
From quicksort to Tim Sort, plus the branch predictor that decides which one is fast today.
- 12Hash Tables and HashingInteractive
Why they exist, why chaining loses to open addressing on real hardware, and how the same idea scales from a dict to OpenSearch shard routing. Measured live.
- 13GraphsInteractive
Traversal, shortest paths, A*, flow, and the representation choices that dominate runtime.
Part IV · Algorithm Design
- 14Dynamic Programming
A taxonomy of DP patterns, and the space optimizations that turn a table into a row.
- 15Searching Algorithms
Binary search, and why a linear scan beats it on small arrays every single time.
- 16Heaps, Tries, and Beyond
Fibonacci heaps, suffix arrays, persistent structures, and when the constant factor kills them.
- 17Problem Solving Strategies
Pattern recognition as a learnable skill, with a framework for the interview and the job.
- 18Greedy Algorithms
When local choices are provably global, and how to tell before you ship.
- 19Divide and Conquer
Recurrences, the master theorem, and cache-oblivious algorithms that win for free.
Part V · Advanced Topics
Part VI · Storage Engines at Scale
- 22B-TreesInteractive
Why every database index is a B-tree and not a binary tree: wide, cache-line-sized nodes turn 20 cache misses into a handful. ~8× faster, measured live.
- 23LSM TreesInteractive
Turning every random write into a sequential append — the engine behind RocksDB, Cassandra, and the write path of modern data infrastructure.