Give me the program in which the compare function is applied on bubble sort to print descending order of sorted array
Compare function in bubble sort
hello @Shivam01 if you want to do sorting in descending order then you can do this in the format like this
sort(arr, arr+n, greater<int>());
by this statement it will automatically do the sorting in descending order .
i hope i have cleared your doubt .
Happy Learning!!
hello @Shivam01 if your doubt has been resolved please mark this doubt as resolved .
on or off the chance if you still have any doubt you can reopen that .
Happy Learning!!
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.