Answers for "custom sort comparator c++"

C++
5

stl sort in c++

sort(arr, arr+n); // sorts in ascending order
Posted by: Guest on June-01-2020
0

stl sort in c++

sort(arr, arr+n, greater<int>()); // sorts in descending order
Posted by: Guest on June-01-2020

Code answers related to "custom sort comparator c++"

Browse Popular Code Answers by Language