int[] a = {5, 2, 8, 1, 9};
// attempt binary search on aWhy might binary search fail on this array?
- A
Binary search needs even length
- B
The array is too small
- Ccheck_circle
The array is not sorted
- D
Arrays must be Strings
Explanation
Binary search requires the array to be sorted; this array is not.