Week 98 of 145 · TAOCP Vol 3: Sorting and Searching

TAOCP 5.2.5 Sorting by Distribution

1 task, 3 steps. Open a task's steps to see exactly what to do; each guide has the detail.

Sign up or sign in to tick these off and give this week a due date.

By the end of this week you can

  • Trace a least-significant-digit radix sort pass on decimal keys.
  • Implement LSD radix sort with counting sort on byte-sized digits.
  • Explain when radix sorting beats comparison sorting.

Week 98 · Self-check

Three quick questions

Ungraded, and it never holds anything up. Pick an answer to see why.

  1. LSD radix sort distributes 170 45 75 90 802 24 2 66 on the units digit, stably. What is the result?
  2. Why does least-significant-digit-first sorting need no recursion into piles?
  3. You sort 32-bit keys with 8-bit digits. How many distribution passes are needed?

Nothing is saved while signed out.

Watch along

Free talks and lectures that go with this week, on the speakers' own channels. Optional.

Discussion

0 posts

Stuck on week 98, or finished early? Say what you tried and what happened. Hints over answers: full solutions go in a spoiler.

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

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

Spot a mistake? Report it