Amortized Analysis — Dynamic Array
Push Element
Auto Push
Reset
Size:0 Cap:1
Dynamic array doubles capacity when full. Individual cost = O(n) at resize, but amortized O(1) per push. Total cost = O(n) for n pushes.