Reported interview periodSep 2026
Number search with delayed feedback
A hidden integer lies in the inclusive range 1..n, where n >= 1. The test fixture supplies a check(x) callback. Your code must not implement the callback and is not given the hidden integer.
Practice focusEach call to check(x) submits a new integer guess in 1..n , but returns the comparison result for the previous submitted guess: - the first call returns None ; - -1 means the previous guess was too high; - 0 means the previous guess was correct; and - 1 means the previous guess was too low. Implement: Return the hidden integer. The fixture validates the answer and permits at most 2 n.bit length() calls to check . Track which guess each delayed response describes; do not apply a response to the newly submitted guess.…