which sort used in setl function cpp code example
Example 1: sort in descending order c++ stl
sort(arr, arr + n, greater<int>())
Example 2: stl sort in c++
sort(arr, arr+n, greater<int>()); // sorts in descending order
sort(arr, arr + n, greater<int>())
sort(arr, arr+n, greater<int>()); // sorts in descending order