Doubling makes appends cheap.
transcript
A million appends to one array. One of them copies half a million entries. Is the array slow? No. Here is the count.
An array of four slots is full. The fifth append needs more room. Allocate eight slots and copy four entries. Then store the new entry. The next three appends need no copy at all.
Ten appends start with room for one. Copies happen at appends two, three, five and nine. They copy one, two, four and eight entries. That is fifteen copies in all.
Now a million appends. Doubling copies one million, forty eight thousand entries. That is about one copy per append. Growing by one slot copies nearly five hundred billion.
Each copy is double the last. The last copy equals all earlier copies, nearly. So the total stays below two per append. That is O of one amortised.
Grow by a factor, never by a constant. Full breakdown in the lecture.