Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Single linked list problem of data structure. In a single linked list, the pointer points to a node, which is the data field or the pointer field? For example, I want to know one
Single linked list problem of data structure. In a single linked list, the pointer points to a node, which is the data field or the pointer field? For example, I want to know one
For a single linked list with a head node, the conditions for judging an empty linked list are as follows

l-& gt; next==NULL

This means that there is nothing (NULL, empty) behind table L. A pointer variable is an integer, and the data stored in it is the memory address value. Imagine the memory as a building, the memory address is a house number, and the pointer variable is a variable that stores a special integer "house number"!

You can think of a structure node as a box containing a data field and a pointer field.

When the pointer points to a node, it points to this box, which is neither a data field nor a pointer field!