Guessing a number with high-low hints
Your friend picks a secret integer from to . You guess repeatedly; after each guess you're told whether the secret is higher or lower. Playing optimally, how many guesses do you need in the worst case to guarantee finding it?
Show hints (2)+
- Each answer halves the search space - this is binary search.
- Worst case ; since , it's .
Answer
Reveal answer →Final answer
10
Create a free account to see the full worked solution and track your progress.
Interview format: Market Maker, Numerical Reasoning Tests