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.
Asked at:
OpenAI
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late August, 2026
OpenAI
Staff
Hello Interview Premium
Your account is free and you can post anonymously if you choose.