Answers for "how to sort in descending order in c++"

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
2

how to sort in descending order in c++

sort(str.begin(), str.end(), greater<int>());
cout<<str;
Posted by: Guest on December-11-2020

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

Browse Popular Code Answers by Language