May 2016
Intermediate to advanced
256 pages
5h 53m
English

Suppose you have a sorted list of 128 names, and you’re searching through it using binary search. What’s the maximum number of steps it would take?
7.
Suppose you double the size of the list. What’s the maximum number of steps now?
8.
You have a name, and you want to find the person’s phone number in the phone book.
O(log n).
You have a phone number, and you want to find the person’s name in the phone book. (Hint: You’ll have to search through the whole book!)
O(n).
You want to read the numbers of every person in the phone book. ...