Kevin De Baerdemaeker

Arrays

Modified 2023-06-25

Arrays are a fixed sized data structure, also known as static arrays. Lists (or dynamic arrays) can grow and shrink dynamically in size, while still having a direct indexed access.

The list operations has stack-like operations being O(1) in complexity, while queue-like operations are O(n).

Typescript

The array in Typescript is really a List, not an Array. It's therefore easy to understand why operations like unshift and shift are slow operations.

Arrays, in a data structure sense, are Typed Arrays.

References


Backlinks