sort in c++ vector code example
Example 1: vector sort c++
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());