Encyclopedia > Array

  Article Content

Array

An array, also known as a vector or list, is one of the simplest data structures in computer programming. Arrays hold a fixed number of equally sized data elements, generally of the same data type, in a continuous block of memory. Individual elements are accessed by index using integers, as opposed to an 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). This is in contrast to linked lists, which have the opposite trade-off. Consequently, arrays are appropriate for storing data which will be accessed in an unpredictable fashion, and linked lists are best for data accessed sequentially.

Most programming languages have arrays built in.

See also: Monge array



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Westhampton Beach, New York

... living together, 11.1% have a female householder with no husband present, and 38.1% are non-families. 32.7% of all households are made up of individuals and 13.7% have ...

 
 
 
This page was created in 30.6 ms