Can you please explain the reason behind taking the upper limit for binary search n (and not n-1)?
In my case taking upper limit to n-1 gives segmentation fault and for n works fine.
Read more… (34 words)
Can you please explain the reason behind taking the upper limit for binary search n (and not n-1)?
In my case taking upper limit to n-1 gives segmentation fault and for n works fine.