Posts

Showing posts from September, 2019

circular doubly linked list

Image
Circular Doubly linked list In this linked list we can go from first node to last node and last node to first node directly.In this case the left link filled of first node contain address of last node and right link of last node contain address of first node. (note-if you not learn about circular singly linked list click on me😊) // program of circular doubly linked list #include<stdio.h> #include<conio.h> #include<stdlib.h> void create();//function prototype void display(); void sinsert(); void pinsert(); void einsert(); void sdelete(); void edelete(); void pdelete(); void searching(); void sorting(); struct node {     int info;     struct node *llink,*rlink; }; struct node *first=NULL,*last=NULL,*new1; int main() {     int choice;     do     {         system("cls");         printf("press 1 to insert value in list\npress 2 to display list\npress 3 to insert at first position\npress 4 to

Circular linked list/circular singly linked list

Image
Circular linked list In this linked list nodes are assessed in circular movement/direction. It does not maintain NULL pointer. 1.Circular singly linked list. 2.Circular doubly linked list. Circular singly linked list. In this linked list we can traverse from last node to first node directly,because the linked field the last node contains address of first address. //circular singly linked list program #include<stdio.h> #include<conio.h> #include<process.h> #include<stdlib.h> void create(); void display(); void sinsert(); void pinsert(); void einsert(); void sdelete(); void edelete(); void pdelete(); void serching(); void sorting(); struct node {     int info;     struct node *link; }; struct node *first=NULL,*last=NULL,*new1; int main() {     int choice;     do     {         system("cls");         printf("press 1 to insert value in list\npress 2 to display list\npress 3 to insert at first position\npress