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