Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ reverse vector

#include <bits/stdc++.h> // Vector
#include <algorithm>  // Reverse 
using namespace std;

int main()
{
    vector<int> nums{4,1,2,1,2};

    reverse(nums.begin(), nums.end());
    return 0;
}
 
PREVIOUS NEXT
Tagged: #reverse #vector
ADD COMMENT
Topic
Name
8+9 =