Linear List
A linear list is a sequence of \(n \geq 0\) nodes \(X_{1}, X_{2}, ... , X_{n}\), whose key structural feature is such an arrangement of list elements relative to each other as if they were placed on a single line. In other words, the following condition must be met in such a structure: if \(n > 0\) and \(X_{1}\) is the first node and \(X_{n}\) is the last, then the k-th node \(X_{k}\) follows \(X_{k − 1}\) and precedes node \(X_{k + 1}\) for all \(1 < k < n\).
The following operations can be performed on linear lists.
- Accessing the k-th node of the list to check and/or modify the contents of its fields.
- Inserting a new node immediately after or before the k-th node.
- Deleting the k-th node.
- Merging two (or more) linear lists into a single list.
- Splitting a linear list into two (or more) lists.
- Creating a copy of a linear list.
- Determining the number of nodes in the list.
- Sorting nodes in ascending order of values in specific fields of these nodes.
- Searching for a node with a given value in a particular field.
Links: