The difference between the first node and the head pointer?
Whether with or without lead node, the list head pointer always points to the first node , the first node is the lead node list of a node, usually it does not store information in the node, which is done in order to facilitate A processing.
Why set up the first node?
- Easy to deal with. For example, the operation of the insertion and deletion of nodes operating a first node to other nodes before the node on the first element of the unity.
- Whether the list is empty, which is a head pointer pointing to the first node of the non-null pointer, the processing of non-null empty list table also unified.