Doubt in money change problem

sir i have doubt in comparator operator operator i didnot understooed

return a<=b;

sir if key = 200 and it is at index 7 than the upper_bound()
function will return the index and after subtracting 1 index should be 6 but why it is still showing 7???

Refer this discussion Why we did lower_bound()-coins-1
If still there are some doubts then you can ask.

You reopened the doubt. Did you read the discussion that i provided?

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.