if we take the end point as n and when we divide (0+n)/2 then we get value of n/2 but the last element of array is n-1 (index no.) then the mid point should be n-1.
but why it is not so?
if we take the end point as n and when we divide (0+n)/2 then we get value of n/2 but the last element of array is n-1 (index no.) then the mid point should be n-1.
but why it is not so?