Game Guides > Game FAQ >  

What are the differences between singly-linked doubly-linked and circularly-linked lists

What are the differences between singly-linked doubly-linked and circularly-linked lists
The difference is how many pointers each node has, and what they are pointing to. A linked list is comprised of "Nodes" each node contains data as well as 1 or more pointers. A singly linked list has one pointer per node, and a doubly linked list has 2 pointers per node. Some programs use several pointers per node. The purpose of these pointers is to hold the list together. In a singly linked list, you can view a node and can then move on to the next node that it is pointing to until you've passed through them all. A doubly-linked list would have a pointer to the next node as well as to the previous node. Thus you can move forward and backward through the list. A circularly-linked list doesn't necessarily have a set number of pointers because it simply means that the last node points to the first node creating a big circle. A non-circularly-linked list would not contain this last to first pointer and thus you would eventually reach the end of the list and stop.