🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Array

In plain terms

An ordered, fixed-layout collection of elements accessed by numeric index.

Going deeper

Arrays store items in contiguous memory, so reading any element by its index is instant. They're the most basic data structure, though inserting in the middle can be costly because elements must shift.

Under the hood

O(1) indexed access but O(n) insertion/deletion in the middle; dynamic arrays (vectors) amortize growth by doubling capacity, occasionally paying a costly resize.

Examples

int[] in Java, Python list, C arrays, JavaScript Array, NumPy ndarray.

Think of it like...

Like a row of numbered mailboxes: you go straight to box #7 instantly, but adding a box in the middle means relabeling everything after it.

Feedback & Bug Report