4 ms·
How you can fix it is by using an integer type that is the same width as the pointer type. Then, there is no way your array can be so big that high + low overf
by kazinator 2y ago
How you can fix it is by using an integer type that is the same width as the pointer type.
Then, there is no way your array can be so big that high + low overflows, unless it's an array of bytes over more than half the entire bit virtual space, which is a fiction.
(If you're binary searching some abstract space that is not an array, I retract my ignorant statements.)