why are we subtracting 1 even after adding compare function to lower_bound. AAfter adding the compare parameter it will return element <=168 . then why subtract 1
Indian Money Change
Hey @Khushwant , -1 is needed over there. As suppose you have money 120 then lower_bound will give you value of 200 but when we do -1 it will give you value 100 . Moreover you will be thinking then why did we used comparator function. It’s for the case if you have money equal to 100. Cause if you don’t use comparator function then it will give you value of 50, which is wrong. Hope this will help you 
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.