Illustrated · 1 min
An array is a data structure with a fixed length. Each element of the data structure has an index, which is how we access them. For an array we denote as the element at index , where .

We can create a new array in and access array elements in . One practical downside to arrays is that they use a lot of memory: suppose you make an array of size to keep track of some things in your program, but end up only storing elements in it; that other empty memory cannot be touched by anything else.