how to use this in sort c++ code example
Example 1: stl sort in c++
sort(arr, arr+n); // sorts in ascending order
Example 2: c++ sort
std::vector s = {5, 1, 3, 6, 2,};
std::sort(s.begin(), s.end());
sort(arr, arr+n); // sorts in ascending order
std::vector s = {5, 1, 3, 6, 2,};
std::sort(s.begin(), s.end());