Question: please help D Question 8 opose we are calling binarysearch(numbers, 45) on a sorted array called numbers initialized as follows: 1 index intl numbers -5,
D Question 8 opose we are calling binarysearch(numbers, 45) on a sorted array called numbers initialized as follows: 1 index intl numbers -5, -3, 0, 2, 8, 15, 22, 38, 45 // search for the value 45 int index -binarySearch(numbers, 45) 0 1 2 3 4 5 67 8 Write the indexes of the elements that would be examined by the binary search (the mid values in our algorithm's code). Assume that we are using the binary search algorithm shown on page 852. Write your answers separated by one space. E.g. binarySearch(8) would be "4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
