What is "chain-list"

A chained list is linear and dynamic, composed of nodes that point to the next element of the list, the last element will point to null (or back to the first, depending on the implementation). To compose a chained list, simply store its first element, although the most common implementations also keep the last one (so you can insert it at the end of the list in constant time). Sometimes you use a special element, called "sentinel", which contains no value and only serves to make sure that the empty list is not without any node.

A list can be simply chained (if each node only points to the "next") or double chained (if each node also points to the "previous"). This way an additional memory is exchanged per node for the ability to traverse the list in reverse order with the same computational cost of doing it in direct order.

See also: