A linked list is a linear collection of self-referential
structures, called nodes, connected by pointer links. A
linked list is accessed by keeping a pointer to the first node of the
list. This pointer to the first node of a list is typically named head.
Subsequent nodes are accessed via a link pointer member that is stored in each
node.
The operations on linked lists include :
- creation of a node
- putting information into the node
- inserting a node into the list
- deleting a node from the list
- is the list empty
- print the list
- etc.
A node is a structure that has whatever members are needed to hold the
data, and a member that is pointer to a structure of the same type, the
link. Since this pointer typically is a pointer to the next item in the
list, it is traditionally called next.