Searching an Array

Think of an integer from 1 to 1 million. Don't tell me what it is!

Let's see how many guesses it takes me to guess it.

I'll make a guess and you click one of the buttons to tell me if I got it or if your number is less or more.

As you play the game, notice how the values of minimum and maximum changes. Each time I guess, I just guess the average between the minimum and maximum, the midpoint.

NEXT: Strings