With two eggs and a building with 100 floors, what is the optimal strategy for finding the lowest floor at which an egg will break when dropped? Followup: What if the number of floors of the building is unknown?
This is from https://gurmeet.net/puzzles/two-eggs-and-a-building/index.html
My approach: The first part, I solved it. But for the followup question, I feel there isn't really a good strategy unless we say avg max height of buildings is (1+50)/2 = 25 approx and then apply same technique as suggested but then it is not definitely guaranteed. So, what should the approach be?