Guess a number from 1 to 100. Always guess the middle and seven tries is always enough: that is binary search.