Computer Science, asked by sattar4938, 1 year ago

Advantages and disadvantages of circular linked list over singly linked list

Answers

Answered by jiyant
17
In it the last node does not contain NULL pointer. Instead the last node contains a pointer that has the address of first node and thus points back to the first node. 

Advantages: 

1. If we are at a node, then we can go to any node. But in linear linked list it is not possible to go to previous node.
2. It saves time when we have to go to the first node from the last node. It can be done in single step because there is no need to traverse the in between nodes. But in double linked list, we will have to go through in between nodes. 

Disadvantages: 

1. It is not easy to reverse the linked list.
2. If proper care is not taken, then the problem of infinite loop can occur.
3. If we at a node and go back to the previous node, then we can not do it in single step. Instead we have to complete the entire circle by going through the in between nodes and then we will reach the required node. 

Answered by carrysmith899
2

Answer:

Advantages

Explanation:

In Circular Linked List,end node will points to first Node (doesn’t contain a NULL pointer)whereas in singly linked list it won’t point to first Node.

Circular list is very useful in case of Game play,to give turns for each player without any failure (due to its circular connectivity).

Circular Linked List can be Used for implementation of Queue.

It saves time when we have to go to the first node from the last node. It can be done in single step because there is no need to traverse the in between nodes.

Similar questions