A linked list is a mathematical abstract model that uses frequent data structures like a chain. It can solve many mathematical problems, such as the Monkey King election problem.
The linked list is also a linear structure. Its full name isChain storage structure of linear tablesThis is because he has another brother namedSequential storage structure of linear tablesBrother has its advantages: Fast random access, but also has its own weakness: When performing insert or delete operations, a large number of elements need to be moved, Which is inefficient.
What is the difference between them?
Sequential storage structure of linear tables: logically adjacent elements are also adjacent to physical locations (memory;
Chain storage structure of linear tables: logically adjacent elements are stored in physical locations (memory ).Not necessarilyAdjacent;
In fact, the linked list has many brothers, including single-chain tables, circular linked lists, and two-way linked lists.
The most basic data element in a linked list isEndPoint(Node), which includes two domains:
Data domain: Used to store its own data;
Pointer Field: Address used to store directly successor elements;