176k views
3 votes
There are 1,000,000 entries in an index. A binary search on this

list would require how many steps?

User Whaledawg
by
8.5k points

1 Answer

2 votes

Answer:

To put that in perspective, binary search on an array with 1,000,000 elements only takes about 20 steps to find what you're looking for, because log_2(1,000,000) = 19.9 .

User Askar Kalykov
by
8.2k points

No related questions found