Proofs of Algorithm Correctness and Runtime Estimates · Guessing a Number
Lesson 2
Programming problem. Implement a function \(\texttt{guess(secret)}\) that takes as input an instance of the \(\texttt{secret}\) class, which has exactly one method: \(\texttt{query(lst)}\). After no more than four calls to this method, your guess function should return an integer \(0 \le x < 16\).
Public samples
Input
(empty)
Expected output
1