Circular Linked List
- A circular linked list is a type of linked list where the last node points back to the first node, forming a circular structure. This circular linking ensures that there is no end to the list, and the traversal can continue indefinitely.
- Here’s an example implementation of a circular linked list in Java:
Representation Of The Node In A Circular Linked List
struct node
{
int data;
struct node *next;
}
Key Points
- Not utilizing next pointer of last node in SLL
- circular linked list
- comparison of CLL with SLL
- small change big difference
- Insertion and Deletion in CLL
Not Utilizing Next Pointer Of Last Node In SLL
Circular Linked List
Comparison Of CLL With SLL
SLL:
Insertion:
- First ( No Traversing)
- Last (Traversing)
Deletion:
- First ( No Traversing)
- Last (Traversing)
CLL:
Insertion:
- First ( Traversing)
- Last (Traversing)
Deletion:
- First ( Traversing)
- Last (Traversing)
Small Change Big Difference
Insertion:
- First ( No Traversing)
- Last (Traversing)
Deletion:
- First ( No Traversing)
- Last (Traversing)
Insertion:
- First ( No Traversing)
- Last (No Traversing)
Deletion:
- First ( No Traversing)
- Last (Traversing)