A Common-Sense Guide to Data Structures and Algorithms, Second Edition: p.P440

On Chapter 2 - Exercise Question 3, shouldn’t we change the answer to 17 times to avoid ambiguity and to answer the question “What is the maximum number of steps it would take to perform a binary search on an array of size 100,000?” correctly?

  1. To solve this, we need to count how many times we halve 100,000 until
    we get down to 1. If we keep dividing 100,000 by 2, we see that it takes
    us 16 times until we get down to about 1.53.
    This means a worst-case scenario would take about 16 times.