Jump to content

Array (data structure)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 209.157.137.xxx (talk) at 17:50, 25 October 2001 (Noted their programming-language support status.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

An array is one of the simplest data structures in computer programming. Arrays hold a group of equally sized data elements in a continuous block of memory. Individual elements are accessed by index using integers (contrast: associative array).


Arrays permit efficient (constant time, O(1)) random access but not efficient insertion and deletion of elements (which are O(n), where n is the size of the array). Compare linked lists which have the opposite trade-off.


Most programming languages have arrays built in.