You ask a friend to pick a number from 1 through 1,000. After asking him ten questions that can be answered yes or no, you tell him the number.
What 10 questions would you ask? What strategy would you have to guarantee you can correctly identify the right number?