I've used vector<int> v[N]
a lot.
It's a very powerful tool for me.
I wonder v[n].push_back()
costs O(1) on average.
I know when the vector is full, it needs to expand into double.
But isn't the sequence of vectors attached to each other?
If so, I think all vectors need to shift to the left which means it costs more than O(n).
To sum up, when it comes to sequence of vector, is v[n].push_back()
always O(1)?
Please give me some help :D