87.0k views
2 votes
For a list to be binary search-able, we need the following thing to be true, because... a. The list must be sorted, because checking the half way point in binary search assumes that the elements to the early part of the list are less than each midpoint and the elements later in the list are greater. b. A list without any negative numbers. Binary search cannot find negative numbers. c. An unsorted list, because binary search will sort the list while it does the searching operation. d. A randomized list, since binary search will have the best chance of finding an element.

User Ananya
by
5.1k points

1 Answer

3 votes

Answer:

The answer is option A.

Step-by-step explanation:

Negative numbers can be found by binary search, this makes option B incorrect.

Unsorted and randomized lists are also not things that support a binary search, options C and D are incorrect.

Binary search uses a technique where the middle element of the list is located and used to determine whether the search should be done within the lower indexed part of the list or the higher. So for a list to be binary search-able, it should be sorted and not randomized.

The answer is A.

I hope this helps.

User Siyuan Ren
by
5.4k points