Algorithm · Hudson River Trading · Medium
A secret integer target lies somewhere within the interval [0, 999]. You don't have direct access to the number. Instead, you can make guesses through the provided game() class, which implements a single method: Each call to query(guess) returns a string based on the following rules: If guess equals target, the method returns "Correct". If this is the very first query and guess does not equal target, the method returns "First". Otherwise, the method compares the distance of…
Checking your access…