Leetcode 374. Guess Number Higher or Lower
Use the API that reports whether a guess is too high, too low, or correct to identify the secret number in [1, n]; this is solved efficiently with a binary search in O(log n) guesses.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.