Given the following sorted lists of integers:
What indexes will be examined as the middle element by a binary search for the target value 8
when the search is run on the following input lists?
What value will the binary search algorithm return?
(Notice that the input list e. isn't in sorted order.
What can you say about the binary search algorithm's result?)
# index 0 1 2 3 4 5 6 7 8
a. numbers = [ 1, 3, 6, 7, 8, 10, 15, 20, 30]
b. numbers = [ 1, 2, 3, 4, 5, 7, 8, 9, 10]
c. numbers = [ 1, 2, 3, 4, 5, 6, 7, 8, 9]
d. numbers = [ 8, 9, 12, 14, 15, 17, 19, 25, 31]
e. numbers = [ 6, 5, 8, 19, 7, 35, 22, 11, 9]