Please explain briefly

suppose we make a bool comparator for sort the array in decreasing order then what should comparator function return to make decreasing order…

@AMIT_KUMAR your compare function should be like this to sort in decreasing order
int cmp(int a,int b){
return a>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.