I’ve done same code that discussed in the video, I’ve checked the indexing of the code to debug. But can’t find any fix.
Update my code with proper explanation.
Please help
I’ve done same code that discussed in the video, I’ve checked the indexing of the code to debug. But can’t find any fix.
Update my code with proper explanation.
Please help
Updated Code.
my compare function is also not working…
@aman212yadav
Okay,
but if I don’t built compare function, it is showing index -1 and then showing value
50, 10, 5, 2, 2
it should have 5, 2, 1 in the end…
why??

this is ur program output without compare function.
it is correct.
lower bound of 168 is 200 (at index 7). so index -1 should be 6 .
similar explanation for remaning indices
so, at index -1 value =2 (is it a garbage value)?
yes . . . . . . . . . .
Thanks!
Marking it as resolved.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.