Crossing, everyone, from today onwards, we talk about the large-scale couplet science fiction: C Chestnut, that is, C language examples. Gossip Hugh,
Words return to the positive turn. Let's talk C chestnuts together!
Crossing, the last time we were talking about the example of a single-chain table-type storage column, the example we're talking about here is: a circular list.
Crossing, the circular link list is also a chain list, but the list of the head and tail of the connection, so constitute a loop chain, so called
As a circular linked list. Let's compare the difference between a single link and a circular list: the tail node of a single linked list is nowhere to be defined, because it
The next pointer value is empty. The tail node of the loop list points to its head node.
Crossing, the text does not write code, the detailed code put in my resources, you can click the link to download the use. The generation of this example
Code is similar to the one in the previous example, except that in the previous example, it is necessary to use pointers and Null in the end of the list.
Line comparison. In this case, the end of the list is judged by using the pointer of the tail node and the pointer of the head node to compare. If these two fingers
PIN is the same, then it means the end of the list.
Crossing, here's an example of a circular list. I want to know what the following example, and listen to tell.
Talk C Chestnut Bar (14th: C-language example-circular list)