the procedure binarysearch (numlist, target) correctly implements a binary search algorithm on the list of…

the procedure binarysearch (numlist, target) correctly implements a binary search algorithm on the list of numbers numlist. the procedure returns an index where target occurs in numlist, or -1 if target does not occur in numlist. 47 mark for review which of the following conditions must be met in order for the procedure to work as intended? a the length of numlist must be even. b the list numlist must not contain any duplicate values. c the values in numlist must be in sorted order. d the value of target must not be equal to -1.

the procedure binarysearch (numlist, target) correctly implements a binary search algorithm on the list of numbers numlist. the procedure returns an index where target occurs in numlist, or -1 if target does not occur in numlist. 47 mark for review which of the following conditions must be met in order for the procedure to work as intended? a the length of numlist must be even. b the list numlist must not contain any duplicate values. c the values in numlist must be in sorted order. d the value of target must not be equal to -1.

Answer

Brief Explanations:

The binary - search algorithm works by repeatedly dividing the search interval in half. It requires the list to be sorted so that it can determine which half of the list to continue the search in. The length of the list can be odd or even, duplicate values can be present, and the target value can be - 1.

Answer:

C. The values in numList must be in sorted order.