The `two egg problem' is a well-known puzzle and over-used interview question. (See eg Generalised Two-Egg Puzzle)
My question is a variant: come up with an algorithm that works when the maximum number of floors is not known before-hand.
Compare https://en.wikipedia.org/wiki/Exponential_search
I have a candidate: drop the first egg at the floors 1, 1+2, 1+2+3, 1+2+3+4, ... until it breaks, then do linear search with the second egg.
So the more important part of my question is: figure out a sensible measure by which that algorithm is optimal. (Or find an algorithm that's better by that sensible measure.)
I am thinking of something like big-O notation, but only forgetting about constant difference and preserving constant factors. But other measures are fine, too.
Generalizations to a larger but fixed number of eggs welcome.