Back to problems

Guess a Secret Number with One-Call Delayed Feedback

Algorithm · OpenAI · Medium

Delayed Oracle Guessing Game Medium · Topics: Binary Search, Interactive · Company Tags · Hints You must discover a hidden integer, the secret, which lies somewhere between $$1$$ and $$n$$ inclusive. To assist you, a function query(x) is available: it accepts a guess $$x$$. However, unlike a standard guessing game, the oracle’s response lags by one invocation. The very first time you call query(x), it returns a special placeholder (such as null) because no earlier guess…

Checking your access…