2 ms·
Reallocating the backing store for a vector is O(n), exactly like the cost of inserting in the middle, so it doesn't change anything much.
by gpderetta 4y ago
Reallocating the backing store for a vector is O(n), exactly like the cost of inserting in the middle, so it doesn't change anything much.