Guessing game using the binary search algorithm