Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

If the item being searched for is not in the array, binary search stops looking

ID: 3571313 • Letter: I

Question

If the item being searched for is not in the array, binary search stops looking for it and reports that it is not there when

array index first > array index last.

Boolean variable found equals false.

Boolean variable found equals true.

it finds a value larger than the search key.

it has examined all the elements in the array.

array index first > array index last.

Boolean variable found equals false.

Boolean variable found equals true.

it finds a value larger than the search key.

it has examined all the elements in the array.

Explanation / Answer

Answer:

array index first > array index last.

Explanation:Binary search algorithm search the element on the basis of the middle element,if the key to search is greater than the middle element than it search in the upper half of the middle otherwise at the lower half of the middle.It stops looking for the key if the array index first > array index last.