Midpoint Overflow

Integer overflow in `(low + high) / 2`.

In languages with fixed-size integers (C++, Java), low + high can overflow.

Example: low = 2^30, high = 2^30. Sum is 2312^{31}, which overflows a signed 3232-bit integer.

Fix: Use mid = low + (high - low) / 2. This is mathematically equivalent but avoids overflow.

Python note: Python integers have arbitrary precision, so overflow isn't a concern. But using the safe formula is good practice.

Alternative in some languages: Use unsigned integers or 6464-bit integers. But low + (high - low) / 2 is the universal fix.