Proofs of Algorithm Correctness and Runtime Estimates · Guessing a Number

Lesson 2

Nikolai Chukhin · Alexander S. Kulikov

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\).

5 points
Public samples
Public sample 1
Input
(empty)
Expected output
1