He blushes, stammers a bit, then kisses her again.
Then launches into an explanation of binary search. He writes out a list of numbers from one to sixteen. "So, I want to find the variable in this list labelled '10'. Instead of going 'first thing in the list, is it what I'm looking for? No? Second thing in the list...' All the way through, we say 'how long is the list, divide that by two, start there.'" He circles 8. "Is what I'm looking for greater than 8? Then now we take a smaller list, the top half, and search through that." He circles twelve. "Ten is less than twelve, so the next sub-list is from eight to twelve, and oh, halfway between that is what we're looking for, ten. We found it in six steps instead of ten. The beauty of this is that you divide the list by half each time, so doubling the size of the list only makes it take slightly longer."