You are trying to guess my favorite number. I tell you it is from 1-100 somewhere and is an interger. You can guess anything you like and I will tell you whether my number is higher or lower then your guess. What is the smallest number of guesses you can make to make sure you will get my number, no matter what it is?
Assume that I don't lie to you about the greater or less than value.
7 times keep on guessing the middle number like 50 then if lower 25 and so on
|
Posted by Viet
on 2003-07-14 07:03:04 |