The foundation of data storage. A contiguous block of memory where elements are accessed directly by index in $O(1)$ time.
1function insert(index, val):2 for i from size down to index:3 array[i+1] = array[i]4 array[index] = val
Welcome to Arrays. Select an operation.