Joined 11 years ago
For example, when low is 0x70000002, high is 0x90000000
int mid = (low + high) >>> 1;
mid = ((unsigned int)low + (unsigned int)high)) >> 1;
For example, when low is 0x70000002, high is 0x90000000
and will both have mid as 1 due to unsigned int overflow.