AI engineering glossary · Data structures algorithms
What is dynamic array?
Dynamic array (also called resizable array, ArrayList, vector): An array that grows automatically: when it fills up, it allocates a larger block, usually double the size, copies the items over and continues. It keeps fast index access while allowing appends without knowing the size beforehand.
Dynamic array: an example
Python's list behaves this way. Appending 1,000 items triggers only a handful of internal resizes, so each append averages constant time.
Related terms
More Data structures algorithms terms
- Dynamic programming
- Edit distance
- Fenwick tree
- Floyd-Warshall algorithm
- Graph
- Greedy algorithm
- Hash table
- Heap sort
Where you learn it
Dynamic array is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.