Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.


Code for Binary Search

Binary search keeps narrowing down the list until it has the value it's looking for. It's faster than linear search because it discards half the potential matches each time.


# Our code here at the top is unchanged from the previous scripts; we
# just call the load_strings function to load our 100,000 sorted
# names from a file.
import sys
from load import load_...