Reverse Number Guesser
Hello I am Numbo, and welcome to the reverse number guesser. Please provide me with a maximum and minimum number and I will use my complex algorithmic skills to guess your number as quickly as possible, and don't worry, I'm not cheating. To start, enter a number and a viable range of the number.
Reverse Number Guesser
How does this work?
No, Numbo doesn't pick a number at random. This code utilizes the binary search algorithm to find your number at the quickest possible way.
Lion in the Desert
Imagine this: you're looking for a lion in a big desert. The quickest way to find the lion is to split the desert into two equal sections. You now know that the lion is at either the first or second section. You repeat this proccess until you find the lion.
Numbo's Proccess
Assume you choose the number 38 with a minimum of 0 and a maximum of 100. The fastest way to guess the number is to use the same thought proccess as the lion in the desert example. For example, 50 is in the middle of 0 and 100. Then I choose 25, then 38.
Video
Feel free to watch this video by Fireship to get a better and more visual representation of the binary search algorithm.