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
3 thoughts on “2 eggs and a K-floors building puzzle”
looks like simple binary search will give your log 2 (K) complicity which is much better than sqrt(K)?
Sorry, meant “complexity”.
crypto5, for log_2(K) complexity you will need log_2(K) eggs 🙂