compare function m a,b m kya jaega money variable ya coins[] ke element
I did not get it
a represents coins[ ] and b represents money!
@mayankA47
bhai coin<=money hona chahiye toh strictly greater than kyu return kr rha h lower bound
bhai ek baar thik se example dekar samjhao na
voh lecture m toh bas aise hi likh diya kuch ache se bataya hi nhi ki aise yeh isiliye return krega ??
@anujsharmabadboy see the video carefully, iterator is also reduced!
the lower_bound Returns an iterator pointing to the first element in the range [first,last) which does not compare less than val.Here you pass compare as <= so it returns first element that is not <= or >.
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.