Question 6
What is the amortized time complexity of inserting an element into a dynamic array that doubles its capacity when full?
Although reallocating memory takes O(n) worst-case time, it occurs infrequently. Spreading this cost across n insertions yields O(1) amortized time.