Capacity

noun

say it: “kuh-PAS-ih-tee” /kəˈpæsɪti/

How many items a growing array can hold before it has to move to a bigger array.

What is a growing array's capacity?

A growing array's capacity is how many slots its array has: the most items it can hold before it must grow. It's different from its count, how many items it holds now, the way the rooms you rent differ from the boxes you own. When the count reaches the capacity, the next add means moving day: a new array, usually twice the size.

In a sentence

  • “The playlist held 9 songs, but its capacity was 16, so seven more could be added before moving day.”

Level: Apprentice · More Data Structures terms at this level

Updated