# Visual explainers

> 11 interactive diagrams of the path's core ideas, each next to the guide that teaches it, and 32 free lectures and talks to watch along.

cracked.guide's visual explainers are 11 small interactive diagrams of the path's core ideas, from a scanner turning text into tokens to sorting and random numbers, each stepped by hand next to the guide that teaches it, plus 32 free lectures and talks to watch along.

## Key facts {#key-facts}

- **Scanning: characters into tokens** (Crafting Interpreters · Ch 4).
- **Parsing: precedence becomes depth** (Crafting Interpreters · Ch 6).
- **Environments and a closure** (Crafting Interpreters · Ch 8 to 11).
- **A bytecode VM, one instruction at a time** (Crafting Interpreters · Ch 14 and 15).
- **A hash table with linear probing** (Crafting Interpreters · Ch 20 · TAOCP 6.4).
- **Mark and sweep** (Crafting Interpreters · Ch 26 · TAOCP 2.3.5).
- **Linked stacks and queues** (TAOCP 2.2.3).
- **Traversing a binary tree** (TAOCP 2.3.1).
- Every diagram works by keyboard, narrates each step, and never plays on its own.
- Updated October 20, 2026.

Step through them at https://cracked.guide/visuals.

- **Scanning: characters into tokens** (Crafting Interpreters · Ch 4): Watch start and current walk the source, the lexeme grow, and each token appear the moment its lexeme ends. Guides: [ci-04](https://cracked.guide/guide/ci-04), [ci-16](https://cracked.guide/guide/ci-16).
- **Parsing: precedence becomes depth** (Crafting Interpreters · Ch 6): Recursive descent turns 1 + 2 * 3 - 4 into a tree; the tighter an operator binds, the deeper its node sits. Guides: [ci-05](https://cracked.guide/guide/ci-05), [ci-06](https://cracked.guide/guide/ci-06), [ci-17](https://cracked.guide/guide/ci-17).
- **Environments and a closure** (Crafting Interpreters · Ch 8 to 11): Each call gets an environment that points to its enclosing one, and a closure keeps the environment it was born in alive. Guides: [ci-08](https://cracked.guide/guide/ci-08), [ci-10](https://cracked.guide/guide/ci-10), [ci-11](https://cracked.guide/guide/ci-11), [ci-25](https://cracked.guide/guide/ci-25).
- **A bytecode VM, one instruction at a time** (Crafting Interpreters · Ch 14 and 15): The instruction pointer walks the chunk while values are pushed and popped on the stack. Guides: [ci-14](https://cracked.guide/guide/ci-14), [ci-15](https://cracked.guide/guide/ci-15).
- **A hash table with linear probing** (Crafting Interpreters · Ch 20 · TAOCP 6.4): Collisions probe to the next slot, deletions leave tombstones, and a full enough table doubles. Type your own keys. Guides: [ci-20](https://cracked.guide/guide/ci-20), [knuth-w097-0](https://cracked.guide/guide/knuth-w097-0), [knuth-w098-0](https://cracked.guide/guide/knuth-w098-0).
- **Mark and sweep** (Crafting Interpreters · Ch 26 · TAOCP 2.3.5): Gray objects wait on a stack to be traced; whatever is still white when marking ends gets swept away, cycles included. Guides: [ci-26](https://cracked.guide/guide/ci-26), [knuth-w044-0](https://cracked.guide/guide/knuth-w044-0).
- **Linked stacks and queues** (TAOCP 2.2.3): Knuth's pointer assignments one at a time: push and pop on a stack, insert and delete on a queue. Guides: [knuth-w034-1](https://cracked.guide/guide/knuth-w034-1), [knuth-w036-0](https://cracked.guide/guide/knuth-w036-0).
- **Traversing a binary tree** (TAOCP 2.3.1): One walk touches each node three times; preorder, inorder and postorder differ only in which touch visits. Guides: [knuth-w039-0](https://cracked.guide/guide/knuth-w039-0).
- **Three sorts, one array** (TAOCP 5.2): Straight insertion, heapsort and two-way merging side by side, one comparison per step, so you can see who finishes first. Guides: [knuth-w077-0](https://cracked.guide/guide/knuth-w077-0), [knuth-w079-0](https://cracked.guide/guide/knuth-w079-0), [knuth-w080-0](https://cracked.guide/guide/knuth-w080-0).
- **A linear congruential generator** (TAOCP 3.2.1 and 3.3.4): Change a, c and m, watch the period, and see the lattice the spectral test measures in the plot of each pair. Guides: [knuth-w048-1](https://cracked.guide/guide/knuth-w048-1), [knuth-w053-0](https://cracked.guide/guide/knuth-w053-0).
- **Exact cover by backtracking** (TAOCP 7.2.2.1): Algorithm X on a tiny example: choose the item with the fewest options, cover, recurse, and undo on a dead end. Guides: [knuth-w119-0](https://cracked.guide/guide/knuth-w119-0), [knuth-w120-0](https://cracked.guide/guide/knuth-w120-0), [knuth-w120-1](https://cracked.guide/guide/knuth-w120-1), [knuth-w121-0](https://cracked.guide/guide/knuth-w121-0).

## Watch along {#watch-all}

### Crafting Interpreters

- [The Craft Behind Crafting Interpreters](https://www.youtube.com/watch?v=KieCF1myFj8), Bob Nystrom, Handmade Cities, 47 min. The author on why the book builds every line of two interpreters by hand, and how he wrote it.
- [Illustrating Crafting Interpreters](https://www.youtube.com/watch?v=iN1MsCXkPSA), Bob Nystrom, Bob Nystrom on YouTube, 9 min. A short look at how the book's hand-drawn diagrams are made, and why pictures carry so much of it.
- [Parsing Explained](https://www.youtube.com/watch?v=bxpc9Pp5pZM), David Brailsford, Computerphile, 15 min, weeks 4 to 4. Grammars, ambiguity and parse trees in a quarter of an hour, the week the book writes its parser.
- [Lecture 10: Open Addressing, Cryptographic Hashing](https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-fall-2011/resources/lecture-10-open-addressing-cryptographic-hashing/), Srini Devadas, MIT OpenCourseWare, 6.006 Fall 2011, 51 min, weeks 18 to 18. Linear probing, deletion and load factor on a blackboard, exactly the table clox builds in chapter 20.
- [Garbage Collection (Mark & Sweep)](https://www.youtube.com/watch?v=c32zXYAK7CI), Laurence Tratt, Computerphile, 16 min, weeks 24 to 24. Roots, marking and sweeping explained plainly before you write clox's collector.

### TAOCP Vol 1: Fundamental Algorithms

- [Lecture 2: Induction](https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/resources/lecture-2-induction/), Tom Leighton, MIT OpenCourseWare, 6.042J Fall 2010, 79 min, weeks 30 to 30. A patient lecture on induction proofs, the tool section 1.2.1 leans on from its first page.
- [Lecture 12: Sums](https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/resources/lecture-12-sums/), Tom Leighton, MIT OpenCourseWare, 6.042J Fall 2010, 78 min, weeks 32 to 32. Closed forms for sums and how to bound the ones without, the moves of section 1.2.3.
- [Lecture 15: Linear Recurrences](https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/resources/lecture-15-linear-recurrences/), Tom Leighton, MIT OpenCourseWare, 6.042J Fall 2010, 78 min, weeks 38 to 39. Solving recurrences like Fibonacci's, a gentle run-up to sections 1.2.8 and 1.2.9.
- [The Analysis of Algorithms (2015, recreating 1969)](https://www.youtube.com/watch?v=vkUNH9r6UCI), Donald Knuth, Stanford Online, 54 min, weeks 40 to 40. Knuth recreating a 1969 lecture on analyzing algorithms, the subject of section 1.2.10.
- [The Joy of Asymptotics](https://www.youtube.com/watch?v=U2W1y0a7PhU), Donald Knuth, Stanford Online, 69 min, weeks 41 to 41. A Computer Musings lecture on O-notation and asymptotic estimates, the week of section 1.2.11.
- [MMIX: A RISC Computer for the New Millennium](https://www.youtube.com/watch?v=r_pPF5npnio), Donald Knuth, Stanford Online, 84 min, weeks 42 to 47. Why the books have a machine of their own at all, from MIX to its successor, while you learn MIX.

### TAOCP Vol 2: Seminumerical Algorithms

- [Using, Generating and Testing with Pseudo-Random Numbers](https://www.youtube.com/watch?v=xXHT_PGOm2c), Frances Buontempo, ACCU Conference 2023, 56 min, weeks 65 to 70. How pseudo-random generators work and how their output gets tested, sections 3.2 and 3.3 in practice.
- [Floating Point Numbers](https://www.youtube.com/watch?v=PZRI1IfStY0), Tom Scott, Computerphile, 9 min, weeks 76 to 77. Why 0.1 + 0.2 is not 0.3, in nine minutes, before Knuth's careful account of rounding.
- [Lecture 5: Number Theory II](https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/resources/lecture-5-number-theory-ii/), Marten van Dijk, MIT OpenCourseWare, 6.042J Fall 2010, 79 min, weeks 79 to 79. Modular arithmetic and inverses on the board, the ground under section 4.3.2.
- [Lecture 11: Integer Arithmetic, Karatsuba Multiplication](https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-fall-2011/resources/lecture-11-integer-arithmetic-karatsuba-multiplication/), Srini Devadas, MIT OpenCourseWare, 6.006 Fall 2011, 47 min, weeks 80 to 80. The first trick that beats schoolbook multiplication, the opening of How Fast Can We Multiply?
- [Lecture 4: Number Theory I](https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/resources/lecture-4-number-theory-i/), Marten van Dijk, MIT OpenCourseWare, 6.042J Fall 2010, 80 min, weeks 82 to 83. Euclid's algorithm and linear combinations, the subject of sections 4.5.2 and 4.5.3.

### TAOCP Vol 3: Sorting and Searching

- [Lecture 3: Insertion Sort, Merge Sort](https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-fall-2011/resources/lecture-3-insertion-sort-merge-sort/), Srini Devadas, MIT OpenCourseWare, 6.006 Fall 2011, 51 min, weeks 94 to 97. The two sorts that open and close section 5.2, with their costs worked out.
- [Lecture 4: Heaps and Heap Sort](https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-fall-2011/resources/lecture-4-heaps-and-heap-sort/), Srini Devadas, MIT OpenCourseWare, 6.006 Fall 2011, 52 min, weeks 96 to 96. Building a heap and sifting down, the heart of sorting by selection.
- [Lecture 7: Counting Sort, Radix Sort, Lower Bounds for Sorting](https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-fall-2011/resources/lecture-7-counting-sort-radix-sort-lower-bounds-for-sorting/), Erik Demaine, MIT OpenCourseWare, 6.006 Fall 2011, 52 min, weeks 98 to 99. Distribution sorting and the comparison lower bound, sections 5.2.5 and 5.3.1 side by side.
- [Lecture 6: AVL Trees, AVL Sort](https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-fall-2011/resources/lecture-6-avl-trees-avl-sort/), Erik Demaine, MIT OpenCourseWare, 6.006 Fall 2011, 52 min, weeks 111 to 111. Rotations that keep a search tree balanced, drawn step by step for section 6.2.3.
- [Lecture 8: Hashing with Chaining](https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-fall-2011/resources/lecture-8-hashing-with-chaining/), Erik Demaine, MIT OpenCourseWare, 6.006 Fall 2011, 51 min, weeks 114 to 115. Hash functions, chaining and simple uniform hashing, a clear start on section 6.4.
- [35 Years of (Linear) Probing](https://www.youtube.com/watch?v=9WQbcNYryKE), Donald Knuth, Stanford Online, 71 min, weeks 114 to 115. Knuth on the analysis of linear probing, which he first worked out in 1962, from section 6.4.

### TAOCP Vol 4A: Combinatorial Algorithms, Part 1

- [Platologic Computation](https://www.youtube.com/watch?v=o22BAuQj3ds), Donald Knuth, Stanford Online, 93 min, weeks 123 to 124. Broadword tricks, many bits at once in one register, from the material that became section 7.1.3.
- [Sideways Heaps](https://www.youtube.com/watch?v=Xv-7xkMLaAw), Donald Knuth, Stanford Online, 78 min, weeks 123 to 124. A data structure built from bitwise operations, drawn from section 7.1.3.
- [Fun With Binary Decision Diagrams (BDDs)](https://www.youtube.com/watch?v=SQE21efsf7Y), Donald Knuth, Stanford Online, 102 min, weeks 125 to 126. Knuth's tour of BDDs and what they can count, the weeks you read section 7.1.4.
- [Fun With Zero-Suppressed Binary Decision Diagrams (ZDDs)](https://www.youtube.com/watch?v=-HzQYeqS9Wc), Donald Knuth, Stanford Online, 93 min, weeks 125 to 126. The ZDD variant for families of sets, the second half of section 7.1.4.
- [Integer Partitions and Set Partitions: A Marvelous Connection](https://www.youtube.com/watch?v=GYGGBYmgdQ8), Donald Knuth, Stanford Online, 90 min, weeks 130 to 131. How the objects of sections 7.2.1.4 and 7.2.1.5 turn out to be linked.
- [Finding All Spanning Trees](https://www.youtube.com/watch?v=LDHlaxewCmE), Donald Knuth, Stanford Online, 82 min, weeks 132 to 132. Generating every spanning tree of a graph, a centerpiece of section 7.2.1.6.

### TAOCP Vol 4B: Combinatorial Algorithms, Part 2

- [Hamiltonian Paths in Antiquity](https://www.youtube.com/watch?v=DjZB9HvddQk), Donald Knuth, Stanford Online, 72 min, weeks 135 to 136. Old puzzles answered by backtracking, a warm companion to section 7.2.2.
- [Dancing Links (2018 Christmas Lecture)](https://www.youtube.com/watch?v=_cR9zDlvP88), Donald Knuth, Stanford Online, 90 min, weeks 137 to 140. Knuth demonstrates exact cover with dancing links, the four weeks of section 7.2.2.1.
- [Dancing Cells (2023 Christmas Lecture)](https://www.youtube.com/watch?v=PUJ_XdmSDZw), Donald Knuth, Stanford Online, 93 min, weeks 137 to 140. The sequel: a newer data structure for the same exact cover problems.
- [The Art of Computer Programming: Satisfiability and Combinatorics](https://www.youtube.com/watch?v=g4lhrVPDUG0), Donald Knuth, Brown University, 129 min, weeks 141 to 144. Knuth on SAT solvers and the problems they crack, the subject of section 7.2.2.2.

---

Source: https://cracked.guide/visuals
cracked.guide: A free, dated 145-week path to getting genuinely cracked at programming.
