Money chane problem

at time stamp 05:44 we use comparator but if we finfd key 100 then lowerbound after comparing givesindex 6 if we subtract 1 from it then it wshould gives 5 not 6.

Hey @Alfred
If we find key 100 then lower bound because of different comparator will give 200 and hence doing -1 will give 6 because 200 is at index 7
see this

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.