60.9k views
4 votes
What additional requirement is placed on an array so that binary search may be used to locate an entry? A. The array must have at least 2 entries B. The array size must be a power of two C. The array must be sorted D. The array elements must form a binary search tree E. None of the above

User Mike Shea
by
6.4k points

1 Answer

2 votes

Answer:

C. The array must be sorted

Step-by-step explanation:

Binary search is used to find a values position in a sorted array

From this definition, The Binary search can only be used on an array that has been sorted. It cannot be applied on an array that is not sorted.

Therefore, the additional requirement that is placed on array so that binary search can be used for the location of an entry is found in option c, The array must be sorted.

User Abhijeet Sharma
by
5.8k points