Remember the "Guess the Number" game? Play it with the computer to guess a number from 1 to 100. Can you figure out an algorithm that will let you guess the right number with the fewest guesses? How many guesses do you need to make in the worst-cast scenario?
If you guess in accending order starting from number 1, your worst case is 100 guesses when the computer is thinking of 100. If you guess in decending order starting from number 100, you can get it in one try if the number is 100. However, what if the computer is thinking of number 1 this time? How many tries do you need?
You have probably figured out a better solution. If you guess the number right in the middle of the number range each time, you can eliminate half of the numbers. In this way you are guaranteed to guess the correct number in at most seven times.