reverse stl in c++ code example
Example 1: how to reverse a vector
//vector<int> A;
reverse(A.begin(),A.end());
Example 2: std::reverse
std::vector<int> v{1,2,3};
std::reverse(std::begin(v), std::end(v));
Example 3: reverse a vector
vector<int> a = {1,2,3,4,5,6};
reverse(a.begin(), a.end());