
254 Data Structures Using C
6.4.1 Circular Linked Lists
A circular linked list is a linked list in which the last node points to the node at the beginning of the
list as shown in Figure 6.18. Thus, it forms a circle, i.e., there is no NULL pointer. In fact, every node has
a successor.
Fig. 6.18 Circular linked list
The main advantage of the circular linked list is that from any node, in the list, one can reach to
any other node. This was not possible in a linear linked list, i.e., there was no way of reaching to nodes
preceding the current node.
A modified algorithm for creation of circular linked list is given below:
Algorithm createCirLinkList() ...