Solved

Consider the Following List

Question 36

Multiple Choice

Consider the following list. list = {5, 11, 25, 28, 45, 78, 100, 120, 125}; Suppose that binary search as discussed in the book is used to determine whether 110 is in list. What are the values of first and last when the while loop, in the body of the binarySearch method, terminates?


A) first = 6, last = 6
B) first = 6, last = 7
C) first = 7, last = 6
D) None of these

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions