Given the numbers 1 to 1000, what is the minimum number of guesses needed to find a specific number if you are given the hint ‘higher’ or ‘lower’ for each guess you make?
Using Binary Search to find a number from 1 to 1,000
500, 250, 125, 63, 32, 16, 8, 4, 2, 1
Read full article from Minimum Guesses To Find A Number Between 1 and 1000
No comments:
Post a Comment