Mistake 1: Using high = arr.length - 1 for lower bound.
Lower bound can return arr.length if all elements are smaller. Initialize high = arr.length.
Mistake 2: Using while low <= high for lower bound.
Lower bound converges when low == high. Using <= causes extra iterations or wrong answers.
Mistake 3: Returning mid instead of low after the loop.
For lower bound, the answer is low (which equals high) after the loop ends.
Debugging tip: Trace through with a -element array like searching for , , , , and . Cover all edge cases.