What’s the fastest way to find a name in a phone book?
- User
What’s the fastest way to find a name in a phone book?
Assistant
The fastest way to find a name in a phone book is to use binary search - essentially the "open to the middle" method:
- Open the phone book to the middle page
- Check if the name you're looking for comes alphabetically before or after what you see
- If it comes before, repeat the process with the first half; if after, use the second half
- Keep halving the search space until you find the name
For example, if you're looking for "Miller":
- Open to the middle - you see "Johnson"
- "Miller" comes after "J", so go to the middle of the second half
- You see "Roberts" - "Miller" comes before "R", so go to the middle between "Johnson" and "Roberts"
- Continue until you narrow down to the right page
This method is dramatically faster than flipping through page by page. In a phone book with 1,000 pages, you'd find any name in at most 10 steps (since 2^10 = 1,024), compared to potentially having to check up to 1,000 pages with a linear search.
Of course, you can also use the alphabetical guide tabs on the side if the phone book has them, which gets you to the right letter section immediately before you start the binary search within that section.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.