An old chestnut goes like this:

You have two identical drinking glasses. You know that these glasses will break if dropped from floor N of a 100 floor building or any higher floor, but they will not break if dropped from any lower floor. N is an unknown integer from 1 to 101.

You are asked to devise a plan to determine N, minimizing the possible number of drops under the plan. (Not the average number; you're trying to minimize the number of drops in the worst-case scenario.) Note that you may retrieve a dropped, unbroken glass and drop it again, but you may not reuse a broken glass, and the plan must determine N in all cases, so if the second glass breaks, this information must be enough for you to determine N.

Answer