Problem #79 MEDIUM
The Password Guessing Game
Google Meta Logic Game Theory
Problem Statement
A computer system generates a secret integer between 1 and 1,000,000 (inclusive). You can ask yes-or-no questions of the form 'Is the number greater than X?' for any X you choose. The system answers truthfully. What is the minimum number of questions needed to guarantee identifying the secret number? If instead the system could lie up to once, how many questions would you need?
Answer & Quick Explanation
Logged-in Users Only
You must be logged in to view the answer and check your solution. Signing up is free and takes less than a minute.
Detailed Editorial Solution
Detailed Editorial Solution is Premium
Unlock detailed step-by-step mathematical proofs, logic explanations, and company-specific interview preparation pathways.