Why does my binary search need an extra comparison? log2(N)+1
I want to find the index of the first integer in an array of integers which is <= key. I can do it with binary search in log2(N)+1 compares. Shouldn’t it be possible with only log2(N) compares? // Returns the index of the first integer in keys <= key. size must be a power of