Cyclic linked list: by pointing a pointer to a terminal node in a single linked list to a header node by a null pointer, the whole single-linked list will travel in a ring. This single-linked list connected to the beginning and end is called a single-cycle linked list, cyclic linked list for short.
The circular linked list solves the problem of finding any node in a single linked list from any node in a single linked list.
Two-way linked list: In each node of a single-chain table, set a pointer field pointing to its precursor node. Therefore, each node in the two-way linked list has two pointer fields, one pointing to direct successor, and the other pointing to direct precursor.
Insert a two-way linked list:
Idea: the sequence of insert operations is to first determine the precursor and successor of the node s to be inserted, then the precursor of the successor node, and finally the successor of the precursor node.
Two-way linked list deletion:
The sequence problem cannot be messy. Suppose a case like this: a family of three shopping shops, Dad in the middle, dad holding his mother in the left and holding the child in the right hand. At this time, the child suddenly had to eat ice cream, and his father had no way to leave to buy it. However, if my father does not feel at ease and his mother does not hold the child's hand in time, she is most worried about the child. Therefore, before leaving, she should put the child's hand in her mother's hand first, then hold the mother's hand to the child. O (distinct _ distinct) O ~
Linked List summary:
Single-chain table, static linked list, cyclic linked list, and two-way linked list.