Dynamic Arrays
Capacity is different from the current logical size.
When capacity is exhausted, a larger backing array is allocated.
Existing elements are copied into the new array.
The growth factor is implementation-dependent.
The resize operation itself is O(n), but ordinary append is amortized O(1).