Answers and Comments


User Avatar
Written by lrreiche


Try throwing an egg from successive even-numbered floors until the egg breaks. Now you know that the lowest breaking floor is either the floor from which you just threw it or the floor below (because you already threw an egg from two floors below and it didn't break). Throw the other egg from the floor below the one you just threw it. If this egg breaks, you are now on the minimum breaking floor; if not, the minimum breaking floor is the one from which the first egg broke.

One might try throwing the first egg from successive multiple-of-three floors until the egg breaks. Now you know that the lowest breaking floor is either the floor from which you just threw it or one of the two you skipped (because you already threw an egg from three floors below and it didn't break). However, throwing the second egg from either of the skipped floors doesn't always tell you about the remaining skipped floor.


User Avatar
Written by CMaster


1. Let's take N for the answer

2. The best choice will be to start with floor N first.
- if the egg breaks, do a linear search starting from 1 to N-1, guaranteeing a solution in N attempts.
- else go to N + (N-1) floor…

3. Continuing in this way, with N attempts, we can cover sum(N + N-1 + N-2… 2 + 1) floors.

Thus the answer is min{N} to yield N *(N+1)/2 > K

So, for example, for K=100, then N=14



User Avatar
Written by lrreiche


Nice!


Saved Stories

Sponsored Categories