Money change problem

sir in this problem we can use upper bound and substract one as upper bound gives always one valu greater even if the key is present

Hey @tejasddongare yes you can compare if key==arr[idx-1] where
idx = upper_bound(arr,arr+arr_size,key)