Check out example codes for "reverse in vector c++". It will help you in understanding the concepts better.

Code Example 1

vector<int> a = {1,2,3,4,5,6};
reverse(a.begin(), a.end());

Code Example 2

//vector<int> A;
reverse(A.begin(),A.end());

Code Example 3

reverse(start_index, last_index);

Learn ReactJs, React Native from akashmittal.com