A Guessing Game
Discover how different search algorithms work by playing a guessing game. Learn the concepts of linear search and binary search, and understand how binary search reduces the number of guesses needed by eliminating half the possibilities each time. This lesson helps you grasp the efficiency differences between search methods and prepares you to apply these algorithms in computer science.
We'll cover the following...
Let's play a little game to give you an idea of how different algorithms for the same problem can have wildly different efficiencies. The computer is going to randomly select an integer from 1 to 16. You have to guess the number by making guesses until you find the number that the computer chose. Let's begin.
Maybe you guessed