Question DSA-SRCH-0001
EasyWhich condition must hold before binary search can be used on an array?
- A.
The array must be small
- B.
The array must have no negatives
- C.
Show answer and explanation
Answer: C
Binary search discards half of the range on each comparison, which only works on sorted data.