Qm

Two eggs and thirty-six floors

A building has 36 floors. Eggs break when dropped from a certain floor or above, and survive (undamaged, reusable) from below it. You have two eggs.

What is the smallest number of drops that always suffices to find the critical floor, and from which floors should you drop? Then explain why the answer for 100 floors is 14.

Show a hint

Once the first egg breaks, the second must be dropped floor by floor from just above the last surviving floor. So each successive gap between first-egg drops should shrink by one, to keep the worst case constant.

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

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

Three eggs and a hundred floorsTwenty-five horses, five lanes, the top twoFewest tests to locate a fragile price levelTying your shoelace on the moving walkwayThe number equal to the sum of the cubes of its digits
All questions →