Flat Preloader Icon

Circular Linked List

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

  1. Not utilizing next pointer of last node in SLL
  2. circular linked list
  3. comparison of CLL with SLL
  4. small change big difference
  5. 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)

Insertion & Deletion In CLL