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

TAOCP 5.3.2 and 5.3.3

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 an adversary argument proves a lower bound for merging.
  • Use binary merging when one sorted list is much shorter.
  • Compute the comparisons a tournament needs to find the second largest.

Week 100 ยท Self-check

Three quick questions

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

  1. You merge 1 key into a sorted list of 7 keys. How many comparisons are needed in the worst case?
  2. What is the minimum worst-case number of comparisons to merge two sorted lists of 4 keys each?
  3. A knockout tournament finds the largest of 8 keys. How many comparisons in total find the largest and the second largest?

Nothing is saved while signed out.

Discussion

0 posts

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