Aller au contenu principal
0

Cette leçon est en anglais pour le moment.

Halve it, again and again

Guess a number from 1 to 1000 while someone says "higher" or "lower", and you never need more than 10 guesses. Binary search uses the same trick on sorted data and turns a million checks into about twenty.