why we are subtracting 1 in line no 25 ??
lb should contains the address of that value which is <=key
why we are subtracting 1 in line no 25 ??
lb should contains the address of that value which is <=key
@CODER_JATIN,
int index = lb - coin - 1;
what actually happens is:
int index = (lb - coin) - 1;
And here (lb - coin) is pointer difference, which gives number of integers in that pointer range.
The final -1 is just to reduce the over counting.
okay okay , thanks ji.