Algorithms & EmergenceAlgorithms
Guess My Number in 7 Tries
Binary search halves the possibilities to find your number fast
Think of a number from 1 to 100. Your phone will find it in 7 guesses or fewer. How, without reading your mind?
You'll find out
- Why 7 guesses always do the trick
- How many guesses a billion takes
- How a search misses what's right there
Why it matters
Computers use the same trick to find one name among millions in a blink, as long as the list is sorted.
Play this lesson
Free to play in your browser or on iPhone