Compare function

even after writing our own compare function we did not remove -1 from int lb but the ans was correct. how?

hello @pranaynigam

we have used compare function to make lower bound behave as upper bound thats why we have to decremebt 1 to get value <=key

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.