183k views
3 votes
Binary search checks the middle contact first because: a) A contact list is sorted. b) It improves search speed. c) It reduces the number of comparisons. d) Middle contacts are typically the most relevant.

1 Answer

4 votes

Answer: a) A contact list is sorted.

Binary search checks the middle contact first because it relies on the assumption that the contact list is sorted. This sorting allows binary search to efficiently eliminate half of the remaining contacts with each comparison, reducing the number of comparisons required to find a specific contact. This property of binary search significantly improves search speed and efficiency when working with sorted data.

User Stephen Horvath
by
8.3k points