capacity

The number of items a structure has room for before it must grow, as opposed to the number it currently holds.

In more detail

A dynamic array's length can be smaller than its capacity; the spare slots let appends proceed without copying. A ring buffer has a fixed capacity and overwrites its oldest item instead of growing. A hash table's load factor compares its item count with its capacity.

Related terms

Taught in

References