113. Searching and Sorting-I

Question.3

A developer computes the midpoint in binary search:

int mid = (low + high) / 2;

For very large arrays (e.g., low = 1,500,000,000 and high = 2,000,000,000 on a system where int is 32-bit signed), what can go wrong?

Need Help? Refer to the Quick Guide below

Select Answer