As long as the resizing e.g. doubles the size each time, the total running time will still be O(n). Basically because
1+2+4+...+2^k = O(2^k) 1+2+4+...+2^k = O(2^k)See https://en.wikipedia.org/wiki/Amortized_analysis#Dynamic_Arr...