You have 2 eggs and a 100-floor building. Find the safe floor in fewest drops
An egg breaks if dropped from some floor or above, and survives if dropped from any floor below that, the same threshold every time. You have exactly 2 eggs, and if one breaks you can't reuse it. Dropping one egg floor by floor from 1 upward is guaranteed to find the answer, but could take up to 100 drops in the worst case. What strategy minimizes the worst-case number of drops?
Reveal the answer
14 drops, by starting at floor 14, then 27, then 39, and so on, dropping 1 fewer floor each time your first egg survives, so that total drops stay capped even if you get unlucky. This balances the risk: if the first egg ever breaks, you switch to checking one floor at a time with the second egg over a shrinking range. It's a classic computer science teaching problem for dynamic programming, since the 'drop intervals that shrink by one' trick generalizes to any number of eggs or floors.