Money change problem

sir I do not understand how the comparator is working
((return a<=b)) ??
and what is the value a and b in the comparator function declaration ??

when you sort a array
then to sort a array
we have to swap element and before swapping we check the element whether we have to swap or not according to comparator function

a and b are the elements of array
return a<=b
means we have to return true if a is less than equal to b

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.