Solved

Can You Search the Following Array Using Binary Search

Question 28

Multiple Choice

Can you search the following array using binary search?
int[] A = {6, 5, 4, 2, 0, 1, -1, -17};


A) No, negative numbers are not allowed because they indicate that a value is not present.
B) Yes.Binary search can be applied to any array.
C) No.Binary search can be applied to a sorted array only.
D) Yes, but the algorithm runs slower because the array is in descending order.

Correct Answer:

verifed

Verified

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

Related Questions