Closed Orasz closed 6 years ago
Corrected the famous binary search bug: when searching for the middle element of an array it is unsafe to do midlle = (high + low) /2 because it can lead to an overflow error, the safe version is middle = (low + (high - low))/2.
Corrected the famous binary search bug: when searching for the middle element of an array it is unsafe to do midlle = (high + low) /2 because it can lead to an overflow error, the safe version is middle = (low + (high - low))/2.