Two Eggs and 100 Floors
This Medium puzzle in the “logic” category rewards careful reading and step-by-step reasoning. Use the hint if you are stuck, then compare your approach with the explained answer.
You have a building with 100 floors and 2 identical eggs.
There is some floor such that:
- If an egg is dropped from that floor or higher, it breaks
- If dropped from below that floor, it does not break
You must determine the highest safe floor.
What is the minimum number of drops needed in the worst case?
Show Hint
Show Solution
The minimum number is 14 drops.
The best strategy is to drop the first egg from floors:
14, 27, 39, 50, 60, 69, 77, 84, 90, 95, 99, 100...
More precisely, the gaps shrink by 1 each time: 14, then +13, then +12, then +11, and so on.
Why?
If the egg breaks on a drop, you use the second egg to test the floors below one by one. By decreasing the jump sizes, the worst-case total stays balanced.
Because 14 + 13 + 12 + ... + 1 = 105, 14 drops are enough to cover all 100 floors.
So the smallest worst-case number of drops is 14.
Preparing…