/* circuler link list */ //Single Circular Linked List #include<iostream> using namespace std; class cnode { private: int data; cnode *next; public: void insert(); void add(); void search(); void update(); void delet(); void show(); }; cnode *head=NULL; cnode *tail=NULL; cnode *current=NULL; cnode *temp=NULL; int p,num; int size=0; int main() { cnode c1; string x; while(1) { cout<<"\n\n1 to insert node"<<endl; cout<<"\n2 to Add node"<<endl; cout<<"\n3 to Search in Nodes"<<endl; cout<<"\n4 to update a value"<<endl; cout<<"\n5 to delete a node"<<endl; cout<<"\n6 to display"<<endl; cout<<"\n7 to exit: "; cin>>x; if(x=="1") { c1.insert(); } else if(x=="2") { c1.add(); } else if(x=="3") { c1.search(); } else if(x=="4") { c1.update(); } else...
/* double link list */ #include<iostream> using namespace std; class dnode { private: dnode *prev; int data; dnode *next; public: void insert(); void add(); void search(); void update(); void delet(); void show(); }; dnode *head=NULL; dnode *tail=NULL; dnode *temp=NULL; dnode *current=NULL; int size=0; int num,p; int main() { dnode d1; string x; while(1) { cout<<"\n -------------------------------"<<endl; cout<<"\n\n=> 1 to insert node"<<endl; cout<<"\n=> 2 to Add node"<<endl; cout<<"\n=> 3 to Search in Nodes"<<endl; cout<<"\n=> 4 to update a value"<<endl; cout<<"\n=> 5 to delete a node"<<endl; cout<<"\n=> 6 to display"<<endl; cout<<"\n=> 7 to exit: "; cin>>x; cout<<"\n -------------...