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
Search Encyclopedia
|
Featured Article
|