Proofs of Algorithm Correctness and Runtime Estimates · Guessing a Number
Lesson 10
Programming problem. Now, implement a strategy that guesses \(0 \le x < 16\) by asking at most nine adaptive questions where at most one of the answers can be wrong.
Public samples
Input
(empty)
Expected output
1