Circular Link List is data structure in which all nodes are connected into the continuous circle. In this list, the last node points to the first node of the list. The last node reference is stored in variable and its next node is first node of the list. Before going to discuss the operation on circular link list we will first see the basic structure of the data structure and see how it can be represented in c programming. First we will see the how the node of circular link list is represented. See the image below:
The component of singly list node:
Here is how the circular link list is represented:
The components of circular link list are:
The structure of circular link list node is represented as below:
The different operations that can be performed on the circular link list are as:
The component of singly list node:
- info : It contains the actual/satelite information
- next : This field points to the next node in the list
Here is how the circular link list is represented:
The components of circular link list are:
- TAIL is pointer points to the last node of the list
- NODE : Each node have info field and next pointer to point next NODE in the list
- Last NODE of the list will point to first node of the list
The structure of circular link list node is represented as below:
struct node{
int info;
struct node *next;
};
typedef struct node NODE;
The different operations that can be performed on the circular link list are as:
- Insert node at first position in circular link list
- Insert node at last position in circular link list
- Insert node at specific position N in circular link list
- Deletion of first node in circular link list
- Deletion of last node in circular link list
- Deletion of node at specific position N in circular link list
Comments
Post a Comment