A dynamic array is a random access, variable-size list data structure that allows elements to be added or removed. It is supplied with standard libraries in many modern programming languages. Dynamic arrays overcome a limit of static arrays, which have a fixed capacity that needs to be specified at allocation.
A limitation of the static arrays discussed so far is that the array size is determined when the array is created and/or allocated. Dynamic arrays allow elements to be added and removed at runtime. Most current programming languages include built-in or standard library functions for creating and managing dynamic arrays.
|C++|| || || |
|C#|| || || |
|Java|| || || |
|Python|| || || |
|Swift|| || || |
- dynamic array
- A data structure consisting of a collection of elements that allows individual elements to be added or removed.