Content deleted Content added
→Overview: Link big-O notation, add braces |
m →Overview: space |
||
Line 17:
a.size := a.size + 1
}
Using [[amortized analysis]], it can be shown that as long as we expand the array by some fixed percentage each time, the cost for inserting ''n'' elements will be O(''n''); we say the insertions have an ''amortized cost'' of O(1) each (see [[big-O notation]] for an explanation of this notation).
|