SlideShare une entreprise Scribd logo
1  sur  6
Télécharger pour lire hors ligne
Deletion from Front:
if(start==NULL)
{
cout<<"No Node to delete...n";
return;
}
Start
Case 1: Linked List is Empty
13
11 12
Start
NULL
Start
Case 1: Linked List is Empty
Case 2: Linked List has Nodes
else
{
13
11 12
Start
Case 2: Linked List has Nodes
13
11 12
Start
ptr
1
2
3
ptr
13
11 12
Start
ptr
2
13
11 12
Start
ptr 3
13
12
Start
13
11 12
Start
1
ptr=start;
start=start->next;
delete ptr;
}
*******************************************************************
Program
//Linked List
#include<iostream>
using namespace std;
//Structure of a Node
struct Node
{
int info;
struct Node *next;
}*new_node,*start,*ptr;
struct Node *create_node(int);
int value;
//Create a New Node
struct Node *create_node(int value)
{ new_node = new Node();
new_node->info= value;
new_node->next=NULL;
return new_node;
}
// Insertion of Node at the begining of the Linked List
void insert_begin(struct Node *new_node)
{ //case 1: linked list is Empty
if(start==NULL)
{
start=new_node;
}
else // Linked List not empty
{
new_node->next = start;
start= new_node;
}
}
//Delete a Node from Front
void delete_begin()
{
if(start==NULL)
{
cout<<"List is emptynNo Node to deleten";
return;
}
else
{
ptr=start;
start=start->next;
delete ptr;
}
}
//Display or Traverse a Linked List
void display()
{
if(start==NULL)
{
cout<<"n No node to diaplay...nList is Empty";
return;
}
else
{
ptr = start;
while(ptr!=NULL)
{
cout<<ptr->info<<"->";
ptr=ptr->next;
}
cout<<"!!!"<<endl;
}
}
int main()
{
int flag=0;
int ch;
while(flag==0)
{
cout<<"Choose an optionn";
cout<<"1. Create a node n2. Insert at Front n3. Delete First node
n4. Display/Travarse n5. Exitn" ;
cin>>ch;
switch(ch)
{
case 1:
cout<<("Enter info for new noden");
cin>>value;
new_node = create_node(value);
if(new_node!= NULL)
{
cout<<"nnew_node created sucessfullyn";
cout<<"new_node->info = "<<new_node-
>info<<endl;
}
else
{
cout<<"Problem in creating noden Try Next
Timen";
return 0;
}
break;
case 2:
insert_begin(new_node);
cout<<"n New node inserted at the begining
successfullyn";
break;
case 3:
delete_begin();
cout<<"Node deleted sucessfully...n";
case 4:
cout<<"n Traversing Linked List..n";
display();
break;
case 5:
cout<<"Exiting...n";
return 0;
}
}
return 0;
}

Contenu connexe

Tendances

Circular linked list
Circular linked listCircular linked list
Circular linked list
dchuynh
 
header, circular and two way linked lists
header, circular and two way linked listsheader, circular and two way linked lists
header, circular and two way linked lists
student
 
Mi 103 linked list
Mi 103 linked listMi 103 linked list
Mi 103 linked list
Amit Vats
 
งานย่อยที่ 7
งานย่อยที่ 7งานย่อยที่ 7
งานย่อยที่ 7
Little Aiiry
 

Tendances (20)

linked list
linked listlinked list
linked list
 
Data Structure Lecture 6
Data Structure Lecture 6Data Structure Lecture 6
Data Structure Lecture 6
 
Circular linked list
Circular linked listCircular linked list
Circular linked list
 
LINKED LISTS
LINKED LISTSLINKED LISTS
LINKED LISTS
 
Linked list
Linked listLinked list
Linked list
 
Doubly linked list (animated)
Doubly linked list (animated)Doubly linked list (animated)
Doubly linked list (animated)
 
Linked list
Linked list Linked list
Linked list
 
header, circular and two way linked lists
header, circular and two way linked listsheader, circular and two way linked lists
header, circular and two way linked lists
 
Data Structure (Double Linked List)
Data Structure (Double Linked List)Data Structure (Double Linked List)
Data Structure (Double Linked List)
 
Doubly Link List
Doubly Link ListDoubly Link List
Doubly Link List
 
Linked list
Linked listLinked list
Linked list
 
作業系統
作業系統作業系統
作業系統
 
Linked List - Insertion & Deletion
Linked List - Insertion & DeletionLinked List - Insertion & Deletion
Linked List - Insertion & Deletion
 
Lecture 6: linked list
Lecture 6:  linked listLecture 6:  linked list
Lecture 6: linked list
 
Mi 103 linked list
Mi 103 linked listMi 103 linked list
Mi 103 linked list
 
Doubly & Circular Linked Lists
Doubly & Circular Linked ListsDoubly & Circular Linked Lists
Doubly & Circular Linked Lists
 
งานย่อยที่ 7
งานย่อยที่ 7งานย่อยที่ 7
งานย่อยที่ 7
 
Data Structure (Circular Linked List)
Data Structure (Circular Linked List)Data Structure (Circular Linked List)
Data Structure (Circular Linked List)
 
linked list using c
linked list using clinked list using c
linked list using c
 
Linked List
Linked ListLinked List
Linked List
 

Similaire à Ds006 linked list- delete from front

Solution#includestdio.h#includeconio.h#includealloc.h.pdf
Solution#includestdio.h#includeconio.h#includealloc.h.pdfSolution#includestdio.h#includeconio.h#includealloc.h.pdf
Solution#includestdio.h#includeconio.h#includealloc.h.pdf
poddaranand1
 
How do you stop infinite loop Because I believe that it is making a.pdf
How do you stop infinite loop Because I believe that it is making a.pdfHow do you stop infinite loop Because I believe that it is making a.pdf
How do you stop infinite loop Because I believe that it is making a.pdf
feelinggift
 
hi i have to write a java program involving link lists. i have a pro.pdf
hi i have to write a java program involving link lists. i have a pro.pdfhi i have to write a java program involving link lists. i have a pro.pdf
hi i have to write a java program involving link lists. i have a pro.pdf
archgeetsenterprises
 
Below is a depiction of a doubly-linked list implementation of the bag.docx
Below is a depiction of a doubly-linked list implementation of the bag.docxBelow is a depiction of a doubly-linked list implementation of the bag.docx
Below is a depiction of a doubly-linked list implementation of the bag.docx
gilliandunce53776
 
This assignment and the next (#5) involve design and development of a.pdf
This assignment and the next (#5) involve design and development of a.pdfThis assignment and the next (#5) involve design and development of a.pdf
This assignment and the next (#5) involve design and development of a.pdf
EricvtJFraserr
 
I need help completing this C++ code with these requirements.instr.pdf
I need help completing this C++ code with these requirements.instr.pdfI need help completing this C++ code with these requirements.instr.pdf
I need help completing this C++ code with these requirements.instr.pdf
eyeonsecuritysystems
 
tested on eclipseDoublyLinkedList class.pdf
tested on eclipseDoublyLinkedList class.pdftested on eclipseDoublyLinkedList class.pdf
tested on eclipseDoublyLinkedList class.pdf
shanki7
 
Ds06 linked list- insert a node after a given node
Ds06   linked list-  insert a node after a given nodeDs06   linked list-  insert a node after a given node
Ds06 linked list- insert a node after a given node
jyoti_lakhani
 
linkedlist-130914084342-phpapp02.pptx
linkedlist-130914084342-phpapp02.pptxlinkedlist-130914084342-phpapp02.pptx
linkedlist-130914084342-phpapp02.pptx
MeghaKulkarni27
 
Use C++ Write a function to merge two doubly linked lists. The input.pdf
Use C++ Write a function to merge two doubly linked lists. The input.pdfUse C++ Write a function to merge two doubly linked lists. The input.pdf
Use C++ Write a function to merge two doubly linked lists. The input.pdf
shalins6
 
THE CODE HAS A SEGMENTATION FAULT BUT I CANNOT FIND OUT WHERE. NEED .pdf
THE CODE HAS A SEGMENTATION FAULT BUT I CANNOT FIND OUT WHERE. NEED .pdfTHE CODE HAS A SEGMENTATION FAULT BUT I CANNOT FIND OUT WHERE. NEED .pdf
THE CODE HAS A SEGMENTATION FAULT BUT I CANNOT FIND OUT WHERE. NEED .pdf
fathimahardwareelect
 
include ltinitializer_listgt include ltiostreamgt .pdf
include ltinitializer_listgt include ltiostreamgt .pdfinclude ltinitializer_listgt include ltiostreamgt .pdf
include ltinitializer_listgt include ltiostreamgt .pdf
iconsystemsslm
 
include ltinitializer_listgt include ltiostreamgt .pdf
include ltinitializer_listgt include ltiostreamgt .pdfinclude ltinitializer_listgt include ltiostreamgt .pdf
include ltinitializer_listgt include ltiostreamgt .pdf
adisainternational
 
Program to insert in a sorted list #includestdio.h#include.pdf
 Program to insert in a sorted list #includestdio.h#include.pdf Program to insert in a sorted list #includestdio.h#include.pdf
Program to insert in a sorted list #includestdio.h#include.pdf
sudhirchourasia86
 
Please do Part A, Ill be really gratefulThe main.c is the skeleto.pdf
Please do Part A, Ill be really gratefulThe main.c is the skeleto.pdfPlease do Part A, Ill be really gratefulThe main.c is the skeleto.pdf
Please do Part A, Ill be really gratefulThe main.c is the skeleto.pdf
aioils
 

Similaire à Ds006 linked list- delete from front (20)

Solution#includestdio.h#includeconio.h#includealloc.h.pdf
Solution#includestdio.h#includeconio.h#includealloc.h.pdfSolution#includestdio.h#includeconio.h#includealloc.h.pdf
Solution#includestdio.h#includeconio.h#includealloc.h.pdf
 
DSA(1).pptx
DSA(1).pptxDSA(1).pptx
DSA(1).pptx
 
How do you stop infinite loop Because I believe that it is making a.pdf
How do you stop infinite loop Because I believe that it is making a.pdfHow do you stop infinite loop Because I believe that it is making a.pdf
How do you stop infinite loop Because I believe that it is making a.pdf
 
Write java program using linked list to get integer from user and.docx
 Write java program using linked list to get integer from user and.docx Write java program using linked list to get integer from user and.docx
Write java program using linked list to get integer from user and.docx
 
hi i have to write a java program involving link lists. i have a pro.pdf
hi i have to write a java program involving link lists. i have a pro.pdfhi i have to write a java program involving link lists. i have a pro.pdf
hi i have to write a java program involving link lists. i have a pro.pdf
 
Below is a depiction of a doubly-linked list implementation of the bag.docx
Below is a depiction of a doubly-linked list implementation of the bag.docxBelow is a depiction of a doubly-linked list implementation of the bag.docx
Below is a depiction of a doubly-linked list implementation of the bag.docx
 
This assignment and the next (#5) involve design and development of a.pdf
This assignment and the next (#5) involve design and development of a.pdfThis assignment and the next (#5) involve design and development of a.pdf
This assignment and the next (#5) involve design and development of a.pdf
 
I need help completing this C++ code with these requirements.instr.pdf
I need help completing this C++ code with these requirements.instr.pdfI need help completing this C++ code with these requirements.instr.pdf
I need help completing this C++ code with these requirements.instr.pdf
 
tested on eclipseDoublyLinkedList class.pdf
tested on eclipseDoublyLinkedList class.pdftested on eclipseDoublyLinkedList class.pdf
tested on eclipseDoublyLinkedList class.pdf
 
Ds06 linked list- insert a node after a given node
Ds06   linked list-  insert a node after a given nodeDs06   linked list-  insert a node after a given node
Ds06 linked list- insert a node after a given node
 
linkedlist-130914084342-phpapp02.pptx
linkedlist-130914084342-phpapp02.pptxlinkedlist-130914084342-phpapp02.pptx
linkedlist-130914084342-phpapp02.pptx
 
Use C++ Write a function to merge two doubly linked lists. The input.pdf
Use C++ Write a function to merge two doubly linked lists. The input.pdfUse C++ Write a function to merge two doubly linked lists. The input.pdf
Use C++ Write a function to merge two doubly linked lists. The input.pdf
 
THE CODE HAS A SEGMENTATION FAULT BUT I CANNOT FIND OUT WHERE. NEED .pdf
THE CODE HAS A SEGMENTATION FAULT BUT I CANNOT FIND OUT WHERE. NEED .pdfTHE CODE HAS A SEGMENTATION FAULT BUT I CANNOT FIND OUT WHERE. NEED .pdf
THE CODE HAS A SEGMENTATION FAULT BUT I CANNOT FIND OUT WHERE. NEED .pdf
 
include ltinitializer_listgt include ltiostreamgt .pdf
include ltinitializer_listgt include ltiostreamgt .pdfinclude ltinitializer_listgt include ltiostreamgt .pdf
include ltinitializer_listgt include ltiostreamgt .pdf
 
include ltinitializer_listgt include ltiostreamgt .pdf
include ltinitializer_listgt include ltiostreamgt .pdfinclude ltinitializer_listgt include ltiostreamgt .pdf
include ltinitializer_listgt include ltiostreamgt .pdf
 
include ltinitializer_listgt include ltiostreamgt .pdf
include ltinitializer_listgt include ltiostreamgt .pdfinclude ltinitializer_listgt include ltiostreamgt .pdf
include ltinitializer_listgt include ltiostreamgt .pdf
 
COMP2710: Software Construction - Linked list exercises
COMP2710: Software Construction - Linked list exercisesCOMP2710: Software Construction - Linked list exercises
COMP2710: Software Construction - Linked list exercises
 
Program to insert in a sorted list #includestdio.h#include.pdf
 Program to insert in a sorted list #includestdio.h#include.pdf Program to insert in a sorted list #includestdio.h#include.pdf
Program to insert in a sorted list #includestdio.h#include.pdf
 
Please do Part A, Ill be really gratefulThe main.c is the skeleto.pdf
Please do Part A, Ill be really gratefulThe main.c is the skeleto.pdfPlease do Part A, Ill be really gratefulThe main.c is the skeleto.pdf
Please do Part A, Ill be really gratefulThe main.c is the skeleto.pdf
 
C++ Please write the whole code that is needed for this assignment- wr.docx
C++ Please write the whole code that is needed for this assignment- wr.docxC++ Please write the whole code that is needed for this assignment- wr.docx
C++ Please write the whole code that is needed for this assignment- wr.docx
 

Plus de jyoti_lakhani

Ds01 data structure introduction - by jyoti lakhani
Ds01 data structure  introduction - by jyoti lakhaniDs01 data structure  introduction - by jyoti lakhani
Ds01 data structure introduction - by jyoti lakhani
jyoti_lakhani
 

Plus de jyoti_lakhani (20)

CG02 Computer Graphic Systems.ppsx
CG02 Computer Graphic Systems.ppsxCG02 Computer Graphic Systems.ppsx
CG02 Computer Graphic Systems.ppsx
 
Projections.pptx
Projections.pptxProjections.pptx
Projections.pptx
 
CG04 Color Models.ppsx
CG04 Color Models.ppsxCG04 Color Models.ppsx
CG04 Color Models.ppsx
 
CG03 Random Raster Scan displays and Color CRTs.ppsx
CG03 Random Raster Scan displays and Color CRTs.ppsxCG03 Random Raster Scan displays and Color CRTs.ppsx
CG03 Random Raster Scan displays and Color CRTs.ppsx
 
CG02 Computer Graphic Systems.pptx
CG02 Computer Graphic Systems.pptxCG02 Computer Graphic Systems.pptx
CG02 Computer Graphic Systems.pptx
 
CG01 introduction.ppsx
CG01 introduction.ppsxCG01 introduction.ppsx
CG01 introduction.ppsx
 
Doubly linked list
Doubly linked listDoubly linked list
Doubly linked list
 
Double ended queue
Double ended queueDouble ended queue
Double ended queue
 
Tree terminology and introduction to binary tree
Tree terminology and introduction to binary treeTree terminology and introduction to binary tree
Tree terminology and introduction to binary tree
 
Priority queue
Priority queuePriority queue
Priority queue
 
Ds06 linked list- insert a node at end
Ds06   linked list- insert a node at endDs06   linked list- insert a node at end
Ds06 linked list- insert a node at end
 
Ds06 linked list- insert a node at beginning
Ds06   linked list- insert a node at beginningDs06   linked list- insert a node at beginning
Ds06 linked list- insert a node at beginning
 
Ds06 linked list- intro and create a node
Ds06   linked list- intro and create a nodeDs06   linked list- intro and create a node
Ds06 linked list- intro and create a node
 
Ds04 abstract data types (adt) jyoti lakhani
Ds04 abstract data types (adt) jyoti lakhaniDs04 abstract data types (adt) jyoti lakhani
Ds04 abstract data types (adt) jyoti lakhani
 
Ds03 part i algorithms by jyoti lakhani
Ds03 part i algorithms   by jyoti lakhaniDs03 part i algorithms   by jyoti lakhani
Ds03 part i algorithms by jyoti lakhani
 
Ds03 algorithms jyoti lakhani
Ds03 algorithms jyoti lakhaniDs03 algorithms jyoti lakhani
Ds03 algorithms jyoti lakhani
 
Ds02 flow chart and pseudo code
Ds02 flow chart and pseudo codeDs02 flow chart and pseudo code
Ds02 flow chart and pseudo code
 
Ds01 data structure introduction - by jyoti lakhani
Ds01 data structure  introduction - by jyoti lakhaniDs01 data structure  introduction - by jyoti lakhani
Ds01 data structure introduction - by jyoti lakhani
 
Ids 016 cooperative intrusion detection
Ids 016 cooperative intrusion detectionIds 016 cooperative intrusion detection
Ids 016 cooperative intrusion detection
 
Ids 015 architecture and implementation of ids
Ids 015 architecture and implementation of idsIds 015 architecture and implementation of ids
Ids 015 architecture and implementation of ids
 

Dernier

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Ds006 linked list- delete from front

  • 1. Deletion from Front: if(start==NULL) { cout<<"No Node to delete...n"; return; } Start Case 1: Linked List is Empty 13 11 12 Start NULL Start Case 1: Linked List is Empty Case 2: Linked List has Nodes
  • 2. else { 13 11 12 Start Case 2: Linked List has Nodes 13 11 12 Start ptr 1 2 3 ptr 13 11 12 Start ptr 2 13 11 12 Start ptr 3 13 12 Start 13 11 12 Start 1
  • 3. ptr=start; start=start->next; delete ptr; } ******************************************************************* Program //Linked List #include<iostream> using namespace std; //Structure of a Node struct Node { int info; struct Node *next; }*new_node,*start,*ptr; struct Node *create_node(int); int value; //Create a New Node struct Node *create_node(int value) { new_node = new Node(); new_node->info= value; new_node->next=NULL; return new_node; } // Insertion of Node at the begining of the Linked List void insert_begin(struct Node *new_node) { //case 1: linked list is Empty if(start==NULL) { start=new_node; } else // Linked List not empty {
  • 4. new_node->next = start; start= new_node; } } //Delete a Node from Front void delete_begin() { if(start==NULL) { cout<<"List is emptynNo Node to deleten"; return; } else { ptr=start; start=start->next; delete ptr; } } //Display or Traverse a Linked List void display() { if(start==NULL) { cout<<"n No node to diaplay...nList is Empty"; return; } else { ptr = start; while(ptr!=NULL) { cout<<ptr->info<<"->"; ptr=ptr->next; } cout<<"!!!"<<endl;
  • 5. } } int main() { int flag=0; int ch; while(flag==0) { cout<<"Choose an optionn"; cout<<"1. Create a node n2. Insert at Front n3. Delete First node n4. Display/Travarse n5. Exitn" ; cin>>ch; switch(ch) { case 1: cout<<("Enter info for new noden"); cin>>value; new_node = create_node(value); if(new_node!= NULL) { cout<<"nnew_node created sucessfullyn"; cout<<"new_node->info = "<<new_node- >info<<endl; } else { cout<<"Problem in creating noden Try Next Timen"; return 0; } break; case 2: insert_begin(new_node); cout<<"n New node inserted at the begining successfullyn"; break;
  • 6. case 3: delete_begin(); cout<<"Node deleted sucessfully...n"; case 4: cout<<"n Traversing Linked List..n"; display(); break; case 5: cout<<"Exiting...n"; return 0; } } return 0; }