The heaviest and the runner-up among eight coins
You have eight coins of eight different weights and a balance that compares one coin with one coin. You want to know both the heaviest coin and the second heaviest coin.
Finding the heaviest alone takes seven comparisons. A naive approach then removes the champion and finds the heaviest of the remaining seven with six more comparisons, for a total of thirteen.
What is the minimum number of comparisons that guarantees you find both?
Show a hint
Which coins could possibly be second heaviest? Only those that were beaten directly by the eventual champion. In a knockout tournament, how many coins is that?
Your answer
Solving needs a free account
Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.
Discussion
💡 Discussion rules
- No full solutions here. Hints and approaches only.
- Complexity, edge cases and intuition are the point.
- Interview experiences are welcome. Respect your NDAs.
Loading discussion…
Learn the concepts
The theory behind this question.