Circular Singly Linked List(CSLL)

  • Circular Singly linked list(CSLL) is the extended version of simple singly linked list.
  • Last node of CSLL will not set by NULL.
  • Last node of CSLL will always point to the first node.
  • Similar to the Singly Linked list CSLL also provide an single directional operation.
  • Similar to the singly linked list ,In CSLL There is one HeadPointer which always points to the first node.HeadPointer have alot of benefits.

 nextNode pointer of last node will always contain address of the first node.
Example :

Here last node is pointing to the first node.This is an circle.here HeadPointer will indicate the first node and we will not change the value of HeadPointer,it will be fix for whole process.

Node Representation

  • Node representation will be same to the singly linked list.
  • Data Element for storing the data, and nextNode is an pointer which will point the next consecutive node.
struct CreateNode
{
    int DataElement;               // for storing the DataElement
    struct CreateNode* nextNode;  // for pointing the next node.
}

Operations of Circular Singly Linked List

There are following operations ,we can apply on Circular singly linked list :

Note : For Complete Explanation of Singly Linked List Operation ,please Refer above Link.

Application of CSLL

  • Use to manage the Computer resources in cyclic manner.
  • Can be use to implements the Stack & Queue Data Structure.
  • Can be use to implement Fibonacci heap.

Leave a Reply

Your email address will not be published. Required fields are marked *