Qm
BrainteasersJane StreetCitadel

Three eggs and a hundred floors

A building has 100 floors. There is a critical floor: eggs dropped from that floor or higher break, eggs dropped from below it survive (and can be reused). You have three identical eggs.

What is the smallest number of drops that guarantees you can identify the critical floor, whatever it is? Explain the reasoning and how it generalises from the two-egg case.

Show a hint

Ask how many floors you can handle with a given number of drops and a given number of eggs. With d drops and e eggs, your first drop splits the problem into "it broke" (d minus 1 drops, e minus 1 eggs, floors below) and "it survived" (d minus 1 drops, e eggs, floors above).

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

Two eggs and thirty-six floorsFewest tests to locate a fragile price levelTwenty-five horses, five lanes, the top twoTying your shoelace on the moving walkwayThe number equal to the sum of the cubes of its digits
All questions →