You have absolutely identical 2 eggs and empty K-story building. You can throw eggs from any floor and see if it was broken or not. If not, you can reuse it again momentarily. You need to identify the lowest floor, starting from which eggs is broken if thrown (“breaking floor”) in minimum possible steps in worst case.
Solution is here: the-problem-of-eggs-and-a-building.pdf
Artem,
looks like simple binary search will give your log 2 (K) complicity which is much better than sqrt(K)?
LikeLike
Sorry, meant “complexity”.
LikeLike
crypto5, for log_2(K) complexity you will need log_2(K) eggs 🙂
LikeLike