sort an array in cpp decreasing 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>());