
Also, I don't see the +1 anywhere, but if you had a <= comparison rather than a < comparison, you'd need it.
I'm not sure what you mean by this, but since this problem is discrete, it should never be necessary to use <=, should it?
The basic concept of binary search is to pick the middle and see where it lies, and (lo + hi) / 2 is the most natural way to express that, even though it runs into problems with integers. Thus it makes more sense to me to alter the algorithm to accommodate this natural representation, rather than the other way around, and since this can be done just by changing the representation of the bounds from inclusive to exclusive, that's perfectly acceptable to me. More importantly, I think it's less to type, and I don't have to think about it, so I code faster :) 