377,884 views
40 votes
40 votes
Let's assume there are 500 items in a sorted list. In the worst case, about how many checks would Binary Search make to find a target value

User Superman
by
2.9k points

1 Answer

27 votes
27 votes

Answer:

500?

Step-by-step explanation:

I'm assuming the search will either check from the beginning or the end. If the the item is the 499 and the search starts at 0 than it will do 500 checks right? Same way if the item is at index 0 and the search starts from the 499.

User Avenmore
by
2.7k points