sort array in descending order in cpp 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;
Example 3: sort in descending order c++
sort(arr, arr + n, greater<int>());