“i assume on the 14 model that if the first breaks on 77, you then drop from 71 73 75 to find the exact floor.”

No, eg: if the highest floor you can drop from is 73, the egg would survive from floor 73 and break on 75. How do you know if the highest floor you can drop from is 73 or 74?

Dev T, good job on beating me to it, that is very close to the best answer. I think my numbers were a bit different towards the end.

]]>if it breaks on 75 you know 74 is the highest

but without physically testing 74 cant you be sure it wont break

]]>- when the first egg breaks, drop second egg in the range of floors underneath the floor between the previously tested floor and the floor

at which the first egg breaks.

eg. if first egg breaks at 77 then test range of floors 70 to 76

When the second egg breaks, the floor beneath is the highest floor you can drop the eggs safely without the egg breaking.

The maximum number of drops is 14 with this method.

Why begin at 14? 14 is the last number in the arithmetic progression

1+2+3+4+5+6+7+8+9+10+11+12+13+14 which just exceeds 100.

The next floor is 14 + 13 = 27

The next floor is 27 + 12 = 39

The next floor is 39 + 11 = 50

,etc,etc,etc

Dev T

TTCS OSSWIN CD at http://www.ttcsweb.org/osswin-cd/

What about going up in a triangular number series 1,3,6,10,15.. with the first egg and using a linear search with the second egg? ]]>

use a *binary chop*. this is a technique for locating an item in a list quickly and with a consistent and predictable elapsed time.

for 100 floors, this finds the correct floor with a maximum of 7 attempts.

increase the number of floors to 1000 and it will find the correct floor with a maximum of 17 attempts.

this is the correct answer and i claim my $5! :)

]]>Then when and if it breaks go the previous X1 floor and start with the second egg.

This whay you will have a maximum of 19 drops to figure it out.

]]>