Thread: Pop quiz!
View Single Post
  #45  
Old 08-12-2004, 08:38 PM
Michiel's Avatar
Michiel Michiel is offline
Last of the ko fighters
Member
 
Join Date: Mar 2003
Location: Netherlands
Posts: 523
Default

Ah. That's binary search. Assume it breaks at floor 100. You have the following tries:

50
75
88
94
97
99
100

Yup, that's 7 tries. Any idea how you would go about it if you had, say, 4 balls?

Or: More than two balls and not enough balls for a binary search?
__________________
The strength of a civilization is not measured by its ability
to wage wars, but rather by its ability to prevent them.
- Gene Roddenberry
Reply With Quote