sort array in descending order stl code example
Example 1: sort in descending order c++ stl
sort(arr, arr + n, greater<int>())
Example 2: how to sort in descending order in c++
sort(str.begin(), str.end(), greater<int>());
cout<<str;
sort(arr, arr + n, greater<int>())
sort(str.begin(), str.end(), greater<int>());
cout<<str;