# TAOCP Vol 3 review

> Study guide to TAOCP Vol 3 review. A review week for Volume 3: sorting and searching.

Updated October 20, 2026.

## Summary {#summary}

TAOCP Vol 3 review: A review week for Volume 3: sorting and searching. Budget about 6 hours; do exercises 5-20, 5.2-13 and 5.2.1-43.

## Key facts {#key-facts}

- Week 117 of 145 on the cracked.guide path, in [TAOCP Vol 3: Sorting and Searching](https://cracked.guide/taocp/volume-3).
- Time budget: about 6 hours.
- 964 exercises in the section, rated 00 to M50; the guide picks 8.
- Picked exercises with Knuth's triangle for recommended: 5-20, 5.2-13, 5.2.1-43, 5.2.2-30, 5.3.4-56, 6.2.2-44, 6.2.3-21 and 6.4-78.
- Before you start: all of Vol 3.

## Week 117 goals {#objectives}

By the end of week 117 you can:

- Compare Volume 3's sorts by speed, stability and worst case.
- Recognize which search structure fits a given access pattern.
- Use one benchmark harness to compare your sorting implementations.

## This week's steps {#steps}

- Read §Vol 3 review: Gather your implementations (quicksort, heapsort, merge sort, radix sort, BST, AVL, B-tree, hash tables) in one repo with a shared benchmark harness.
- Work the exercises (8 picked): Start with Ex 5-20, Ex 5.2-13, Ex 5.2.1-43; log what you solve below.
- Write down one thing you'd explain to someone: A few sentences in your own words in Your notes: the idea, why it works, an example. 30 words ticks this.

## Exercises {#exercises}

Vol 3 has 964 exercises in all (counting the chapter 5 opener and the 5.2 and 5.4 intros), rated 00 to M50, and 217 of them carry Knuth's triangle for recommended. Use the week to finish ones you skipped, or try this mixed set, none of which were weekly picks: a little harder than average, one or two from each part of the volume, referenced as section-number (5-20 means the chapter 5 opener).

Worth your time:

- 5-20 (rated 25, recommended): Find all pairs of words that differ in at most two bits. Sorting as a tool for a search problem.
- 5.2-13 (rated 27, recommended): Do distribution counting in place, with no second array of records.
- 5.2.1-43 (rated 25, recommended): Remove the bounds test from shellsort's inner loop without a sentinel.
- 5.2.2-30 (rated 25, recommended): Keep quicksort fast on multiword keys as the file nears sorted order.
- 5.3.4-56 (rated 25, recommended): For any unsorted 0-1 vector, build a network that fails only on it. Why the zero-one test must be exhaustive.
- 6.2.2-44 (rated 25, recommended): Rebuild a binary tree from the depths of its leaves in order.
- 6.2.3-21 (rated 30, recommended): Build perfectly balanced trees online in linear time.
- 6.4-78 (rated M26, recommended): Prove a multiply-and-shift family is universal. The hash function many fast libraries use.

## Why it matters {#why}

This is the most directly practical volume. Consolidating it gives you a reference you will use for the rest of your career.

## Before you start {#before}

- All of Vol 3

## How to approach it {#approach}

Gather your implementations (quicksort, heapsort, merge sort, radix sort, BST, AVL, B-tree, hash tables) in one repo with a shared benchmark harness. Write a short decision guide: which sort or search structure when.

## Links {#links}

- [Knuth's TAOCP page (editions, errata, MIX/MMIX)](https://www-cs-faculty.stanford.edu/~knuth/taocp.html)
- [Vol 3 errata (plain text, from Knuth)](https://www-cs-faculty.stanford.edu/~knuth/err3.textxt)

---

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