Let me put up my requirement straight away

*I want The vector to be updated rather than creating a new vector

*Will the complexity (running time) be better?

say for eg:
Code:
#include<iostream>
#include<vector>
using namespace std;
int main()
{
    int i,j=0;
   
      vector < vector<long long int> > g(100);
g[1].push_back(2);
g[2].push_back(3);
         return(0);
}
now all i wanted to do is to update the vector after a few steps...
i want it to look like a new emplty vector with
Code:
2 associated with 1
3 associated with 2...ie just the reverse of the previous one...i want the previous associations to be removed
ofcourse i can do it by creating a new vector with the second associations alone....
but i dont need that...I want the original vector to be updated with minimal complexity