Using comparators to sort in descending order

how the numbers are sorted in descending order if the condition inside compare function is a>b instead of b>a.
is f swap function works then thet will arranged in increasing order.

Hey @Alfred
the compare function return true or false on the basis of comparison if the comparison returns true a is placed before b else otherwise

So we want to place a before b if its greater hence we return true when a>b