# Understanding access and insertion time of arrays

Why do most implementations of arrays have constant access time and linear insertion time?

Because they are using the pointer to access to an index of the array, hence the access time is constant. Moreover, as indices of the array are stored beside each other (to access in constant time), insertion to the array needs to extend the allocated storage of the array to insert a value, and it needs to copy all values of the array to the newly allocated storage with size $$n + 1$$. Hence, insertion of the array is $$O(n)$$ in most of the implementations.
To know more about this, you can seek around "dynamic array" for constant access time and amortized $$O(n)$$ for $$n$$ insertion.