reverse algorithm c++ code example Example: how to reverse a vector //vector<int> A; reverse(A.begin(),A.end());