c++ vector sort ascending code example
Example 1: sort vector
sort(v.begin(), v.end());
Example 2: sort vector c++
sort(begin(v), end(v), [] (int a, int b) { return a > b; }); // decrease
Example 3: how to sort a vector
vector<int> v;
sort(v.begin(),v.end());