Answers for "c++ sort comparator function example"

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 "c++ sort comparator function example"

Browse Popular Code Answers by Language