reverse a sub vector in c++ code example
Example 1: reverse a vector
vector<int> a = {1,2,3,4,5,6};
reverse(a.begin(), a.end());
Example 2: reverse in vector c++
reverse(start_index, last_index);
vector<int> a = {1,2,3,4,5,6};
reverse(a.begin(), a.end());
reverse(start_index, last_index);