The list tag may refer to: a linked list (an ordered set of nodes, each referencing its successor), or a form of dynamic array. Not to be used for HTML lists, use [html-lists] instead.

Specific Implementations

Almost every programming language provides support for list data structures. They are particularly common in functional languages, because their inductive properties lend themselves to elegant iterative and recursive abstractions.

Performance:

The flexibility of linked lists is somewhat offset by the complexity of some operations on lists (accessing an element at index n in a linked list is O(n), while for arrays it is O(1)). In practice, linked lists are a very disadvantageous structure for random-access-based algorithms. Linked lists support quick O(1) appends, dynamic arrays also support O(1) appends however this O(1) runtime is amortized as it must factor in the periodical re-sizing of the dynamic array. The performance of lists and arrays is of the same order (O) for operations that deal with every element of the list in order.

Types

Lists are the canonical recursive (or inductive) data type.

See also:

Tags:

Links:

Do not use this tag for unordered/ordered lists in HTML, use instead.