vector sort cppref code example Example: sort vector c++ sort(begin(v), end(v), [] (int a, int b) { return a > b; }); // decrease