How long does it take to find what you need?
After moving from one town to another, you have 64 unlabeled boxes. One of the boxes contains your coffee pot, and you desperately need a cup of coffee. You line up the boxes in no particular order and open the first box in line. No luck. If your coffee pot were in that box, you’d have seen it right away.
You open the second box, then the third, and then the fourth. Still, no luck. If your worst fear comes true, you won’t find the pot until you’ve opened the 64th box. But chances are, the coffee pot is somewhere in the middle of the line – maybe the 32nd box. That’s still not encouraging.
What if you could turn your search into a computer programming problem? Instead of opening boxes, you search an unordered list for the words “coffee pot”? If the list has 64 elements, you may have to check all 64 items. On average, you’ll check about half of those items – roughly 32 of...