vector reverse function code example
Example 1: c++ reverse part of vector
//Reverse vector partially (from index x to index y)
reverse(v.begin()+x, v.begin()+y+1);
Example 2: reverse a vector
vector<int> a = {1,2,3,4,5,6};
reverse(a.begin(), a.end());