The Two-Egg Drop
100 floors, 2 eggs. Find the breaking floor in the fewest worst-case drops.
by MindYourPuzzle
A staple of engineering interviews — the wrong instinct (binary search) quietly fails.
A building has 100 floors. There's a critical floor F: an egg dropped from floor F or higher breaks; from any floor below F it survives (unharmed, reusable).
You have exactly 2 identical eggs. You want to find F for sure, using as few drops as possible in the worst case. Once an egg breaks, it's gone.
(Binary search would need the first egg to survive a fall from floor 50 — but if it breaks there, one egg left means you'd have to check floors 1–49 one by one: up to 50 drops. You can do much better.)
What is the minimum number of drops that guarantees you find F in the worst case?
(Answer with the number of drops.)