Lily has a bookshelf on which 63 books are neatly arranged in alphabetical order, and she is now looking for her favorite combinatorics book.
Using the best approach, what is the maximum number of books she would have to check?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Lily may use binary search algorithm to find here favorite book. Binary search (half-interval search) is one of the fundamental algorithms in computer science. Binary search runs in at worst logarithmic time, making lo g 2 ( n ) time. In this case, the maximum number of books to be checked is lo g 2 ( 6 3 ) = 5 . 9 9 7 ⟹ 6 books.