Choose a pattern to try:

The Phone Book Problem
1/5

The Phone Book Problem

Imagine you need to find a name in a phone book with 1,000 pages. You could start from page 1 and check every page (slow!), or you could open the book in the middle and decide which half to search next. This is the core idea behind **Binary Search** — one of the most powerful algorithm patterns.