vivavivi.tech
Blog
🇬🇧
English
Theorem
Amortized append theorem for dynamic arrays
If a dynamic array grows its capacity geometrically on overflow, then a sequence of n appends runs in O(n), so the amortized cost of one append is O(1).
← All theorems