Money change problem stl

In the problem why is the index of coin subtracted by one in the code given in the video. for eq the index should be lower bound-coin only.

@Codarikh lower bound gives us the position which is greater than or equal to the number you are searching for.
but we want here position of number less than or equal to the number we are searching for that is why we have taken -1 here.
watch the video slowly again you will get it.

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.