Dropping Two Eggs Puzzle
You are given 2 identical eggs and a 100-floor building.
An egg dropped from the Nth floor or above will break.
But, it will not break if dropped from any floor below N.
How do you find N with the fewest number of drops for the worst case?
Drop the first egg from floors K1, K2, … Kz until it breaks on drop z.
Then drop the second egg from floor K[z-1]+1 and each floor above till it breaks when dropped from floor N.
Finding N takes z + N – K[z-1] drops.
If the first egg breaks on the second drop, it will take the same number of drops to find N if K1 = K2 + 1.
Generalize to K[i+1]=K[i]-1.
Starting at K1=14 would reach the 99th floor as the 11th drop of the first.
Worst case is 14 drops for N=14,27,39,50,60,69,77,84,90,95, and 99.