When using a doubling strategy for a dynamic array, a single…
When using a doubling strategy for a dynamic array, a single insertion might take O(n) time due to resizing. However, what is the amortized time complexity of a sequence of n insertions, and why?