Physics I / Searching and sorting ideas
Practice question · Estimate

Binary search finds a name among 1,000 sorted entries in ~10 steps. Estimate the steps needed for 1,000,000,000 (a billion) sorted entries.

Estimate on a scale from 0 steps (0) to 100 steps (100).

Hints
  1. Each step halves the remainder: the count is log2n\log_2 n.
  2. A billion ≈ 2302^{30}, or reuse the pattern: 1000× more data costs only ~10 more steps.
Show the answer

30 (answers within ±4 count)

Why

About 30 steps, a billion-entry phone book, solved in the time of 30 comparisons. Logarithms barely grow: that is why sorted structures and tree indexes power every database on Earth.

Read the lesson: Searching and sorting ideas →

Practise Searching and sorting ideas

The app has 8 more questions on this lesson, and keeps your place in the course. Physics I is free to start.

More questions on Searching and sorting ideas