dynamic array Algorithm

In computer science, a dynamic array, growable array, resizable array, dynamic table, mutable array, or array list is a random access, variable-size list data structure that lets components to be added or removed. Dynamic arrays overcome a limit of static arrays, which have a fixed capacity that needs to be specify at allocation.

dynamic array source code, pseudocode and analysis

Compared to associated lists, dynamic arrays have faster indexing (constant time versus linear time) and typically faster iteration due to better locality of reference; however, dynamic arrays necessitate linear time to insert or delete at an arbitrary location, since all following components must be moved, while associated lists can do this in constant time. The dynamic array has performance like to an array, with the addition of new operations to add and remove components.