Dynamic-array doubling
Append to an array with spare capacity; when full, allocate twice the capacity and copy existing entries.
Key knowledge
Append to an array with spare capacity; when full, allocate twice the capacity and copy existing entries. Copy counts over m appends form a geometric sum O(m), hence append has O(1) amortized cost although a resizing append costs Θ(n).
Conditions and scope
- Start with positive constant capacity; use bounded-cost element moves and allocation proportional to allocated length.
- The claim covers appending, not arbitrary insertions, deletions or a poorly chosen shrink policy.
Sources · 1
References
Sources retain their recorded scope. A source link alone does not establish verification of every statement.
Evidence and review
Lecture 11 section 11.4 dynamic-table expansion and geometric aggregate/potential analysis.
2026-10-10 · Independent AI editorial review: All241 compact claims, hypotheses, displayed equations/conventions and all596 origin semantic links read; entire241-entry author exact-source inspection matrix and declared limitations reviewed. Prior105 actual inherited Mathematics/Information records read for whole-inventory breadth. Targeted independent primary sections are listed below; this does NOT claim every cited source body or every proof was independently re-read. This is AI reference-content review, not human disciplinary certification, exhaustive textbook reproduction or experimental replication. Receipt: mathematics-information-independent-content-review.1.
Entry details
Permanent link to this entry ↗- Record identity
- info-dynamic-array-doubling
- Revision
- university-core.1
- Structured reference record
- University core expansion