Answers for "sort in descending order c++ stl"

C++
11

how to sort in descending order c++

int arr[10];
int length = sizeof(arr)/sizeof(arr[0]); 
sort(arr, arr+length, greater<int>());
Posted by: Guest on May-16-2020
6

sort in descending order c++ stl

sort(arr, arr + n, greater<int>())
Posted by: Guest on July-19-2020

Code answers related to "sort in descending order c++ stl"

Browse Popular Code Answers by Language