TAOCP Vol 3: Sorting and Searching · Week 117

TAOCP Vol 3 review

Updated

About 6 hours964 exercises, rated 00 to M50

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.

Flashcards 13 cards for Anki and AnkiMobile · all decks

Anki deck.tsv

This week's steps

3 steps
  1. 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.

  2. Work the exercises (8 picked)

    Start with Ex 5-20, Ex 5.2-13, Ex 5.2.1-43; log what you solve below.

  3. 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.

Sign in to track this: tick each step off and it counts toward your week.

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

  • Exercise 5.2-1327▶ Recommended

    Do distribution counting in place, with no second array of records.

    Discuss

  • Exercise 5.2.1-4325▶ Recommended

    Remove the bounds test from shellsort's inner loop without a sentinel.

    Discuss

  • Exercise 5.2.2-3025▶ Recommended

    Keep quicksort fast on multiword keys as the file nears sorted order.

    Discuss

  • Exercise 5.3.4-5625▶ Recommended

    For any unsorted 0-1 vector, build a network that fails only on it. Why the zero-one test must be exhaustive.

    Discuss

  • Exercise 6.2.2-4425▶ Recommended

    Rebuild a binary tree from the depths of its leaves in order.

    Discuss

  • Exercise 6.2.3-2130▶ Recommended

    Build perfectly balanced trees online in linear time.

    Discuss

  • Exercise 6.4-78M26▶ Recommended

    Prove a multiply-and-shift family is universal. The hash function many fast libraries use.

    Discuss

Your log

Sign in to log the exercises you work: number, rating, how far you got.

Your notes

Only you

Sign in to keep private notes on this guide, in Markdown. They stay yours: never on your profile, and you can export them all.

Discussion

0 posts

Questions about the reading go here; each exercise has its own thread below. Hints over answers.

No posts yet. Ask a question or share a tip.

Sign in to postAnyone can read. Posting needs an account with a confirmed email.

Exercise threads

One thread per exercise. Open one to ask for a nudge or check your thinking.

  • Exercise 5.2-1327No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 5.2.1-4325No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 5.2.2-3025No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 5.3.4-5625No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 6.2.2-4425No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 6.2.3-2130No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

  • Exercise 6.4-78M26No posts yet

    Hints over answers. Say what you tried; put an answer or a full solution inside a spoiler: ||like this|| or a ```spoiler block.

    Sign in to postAnyone can read. Posting needs an account with a confirmed email.

Reference

Why it matters

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
  • All of Vol 3
How to approach it

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.

Spot a mistake? Report it

Back to week 117