stl algorithm to sort in descending order code example
Example 1: sort in descending order c++ stl
sort(arr, arr + n, greater<int>())
Example 2: sort in descending order c++
sort(arr, arr + n, greater<int>());
sort(arr, arr + n, greater<int>())
sort(arr, arr + n, greater<int>());