Dynamic array: Difference between revisions

Content deleted Content added
Dcoetzee (talk | contribs)
Write intro, discuss operations, amortized costs, brief language support, CLRS reference
Dcoetzee (talk | contribs)
+array list
Line 1:
A '''dynamic array''', '''growable array''', or '''dynamic table''', or '''array list''' is a [[data structure]], an [[array]] which is automatically expanded to accomodate new objects if filled beyond its current size. It may also automatically deallocate some of its unused space to save memory. They have become a popular [[data structure]] in modern mainstream programming languages, supplied with most standard libraries.
 
One of the main disadvantages of a simple array is that it has a single fixed size, and although its size can be altered in some environments (for example, with C's <code>realloc</code> function), this is an expensive operation that may involve copying the entire contents of the array.