Week 107 of 145 ยท TAOCP Vol 3: Sorting and Searching

TAOCP 5.4.9 and 5.5

2 tasks, 6 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

  • Explain how seek and latency costs shape merge patterns on disks.
  • Use striping to keep several disks busy during an external merge.
  • Compare sorting methods by speed, stability, memory and worst case.

Week 107 ยท Self-check

Three quick questions

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

  1. Runs of lengths 2, 3, 4, 5 are merged two at a time, always merging the two shortest. How many records are moved in total?
  2. Why stripe a file's blocks across several disks?
  3. You need a stable sort with a guaranteed O(n log n) worst case. Which method fits?

Nothing is saved while signed out.

Discussion

0 posts

Stuck on week 107, 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