SlideShare una empresa de Scribd logo
1 de 19
Taslima Yasmin Tarin
2015-2-50-022
linked list is a linear data structure.
• Linked list is a collection of elements called
nodes.
• Each node contains two parts. they are
data part and link part.
data link
LINKED LISTS
• The above figure shows the example of marks
obtained by different students can be stored in a
linked list
Here N-stands for NULL.
Null indicates the end of the node.
14 100 30 400 42 N
TYPES OF LINKED LISTS
1. Single linked list
2. Double linked list
OPERATIONS ON LINKED LISTS
The basic operations on linked lists are
1. Creation
2. Insertion
3. Deletion
4. Traversing
5. Searching
Creation
Insertion
There are 3 cases here:-
Insertion at the
beginning
Insertion at the end
Insertion after a
particular node
The creation operation is used to create a
linked list
Insertion at the beginning
There are two steps to be followed:-
a)Make the next pointer of the node point towards the
first node of the list
b)Make the start pointer point towards this new node
 If the list is empty simply make the start pointer point
towards the new node;
Inserting at the end
Here we simply need to make the next pointer
of the last node point to the new node
Inserting after an element
Here we again need to do 2 steps :-
 Make the next pointer of the node to be inserted point to
the next node of the node after which you want to insert
the node
 Make the next pointer of the node after which the node is
to be inserted, point to the node to be inserted
Deleting a node
Here also we have three cases:-
 Deleting the first node
Deleting the last node
Deleting the intermediate node
Deleting the first node
Here we apply 2 steps:-
 Making the start pointer point towards the 2nd
node
 Deleting the first node using delete keyword
 start
threetwoone
Deleting the last node
start
Here we apply 2 steps:-
 Making the second last node’s next pointer point to NULL
 Deleting the last node via delete keyword
node3node2node1
Deleting a particular node
Here we make the next pointer of the node previous to
the node being deleted ,point to the successor node of
the node to be deleted and then delete the node using
delete keyword
node1 node2 node3
Searching
Traversing
Searching operation is a process of accessing the
desired node in the list. We start searching node –
by-node and compare the data of the node with
the key.
Traversing operation is a process of going
through all the nodes of a linked list from one
end to the another end. If we start traversing
from the very first node towards the last node ,
It is called forward traversing.
ADVANTAGES OF LINKED LISTS
We can dynamically allocate memory space as
needed
We can release the unused space in the situation
where the allocated space seems to be more.
Operation related to data elements like insertions
or deletion are more simplified.
Operation like insertion or deletion are less time
consuming.
Linked lists provide flexibility in allowing the
items to be arranged efficiently.
LIMITATIONS OF LINKED LISTS
When ever we deal with fixed length
lists it would be better to use an array
rather than linked list.
Linked list will consume more storage
space than an array with same number of
items this is because each item has an
addition link field
APPLICATIONS
Linked lists are used in many other data
structures.
Linked lists are used in polynomial
manipulation.
Representation of trees, stacks, queues.
etc.,

Más contenido relacionado

La actualidad más candente

Insertion in singly linked list
Insertion in singly linked listInsertion in singly linked list
Insertion in singly linked listKeval Bhogayata
 
Java Linked List Tutorial | Edureka
Java Linked List Tutorial |  EdurekaJava Linked List Tutorial |  Edureka
Java Linked List Tutorial | EdurekaEdureka!
 
DOUBLE LINKED LIST(DATA STRUCTURE) PPT BY PRASUN KUMAR
DOUBLE LINKED LIST(DATA STRUCTURE) PPT BY PRASUN KUMARDOUBLE LINKED LIST(DATA STRUCTURE) PPT BY PRASUN KUMAR
DOUBLE LINKED LIST(DATA STRUCTURE) PPT BY PRASUN KUMARPrasunKumar38
 
Doubly & Circular Linked Lists
Doubly & Circular Linked ListsDoubly & Circular Linked Lists
Doubly & Circular Linked ListsAfaq Mansoor Khan
 
Doubly linked list
Doubly linked listDoubly linked list
Doubly linked listFahd Allebdi
 
Data Structures with C Linked List
Data Structures with C Linked ListData Structures with C Linked List
Data Structures with C Linked ListReazul Islam
 
Doubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || AlgorithmsDoubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || AlgorithmsShubham Sharma
 
Circular linked list
Circular linked listCircular linked list
Circular linked listchauhankapil
 
Stacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURESStacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURESSowmya Jyothi
 

La actualidad más candente (20)

Insertion in singly linked list
Insertion in singly linked listInsertion in singly linked list
Insertion in singly linked list
 
Linked lists
Linked listsLinked lists
Linked lists
 
Java Linked List Tutorial | Edureka
Java Linked List Tutorial |  EdurekaJava Linked List Tutorial |  Edureka
Java Linked List Tutorial | Edureka
 
Linked list
Linked listLinked list
Linked list
 
Linked List
Linked ListLinked List
Linked List
 
Double ended queue
Double ended queueDouble ended queue
Double ended queue
 
DOUBLE LINKED LIST(DATA STRUCTURE) PPT BY PRASUN KUMAR
DOUBLE LINKED LIST(DATA STRUCTURE) PPT BY PRASUN KUMARDOUBLE LINKED LIST(DATA STRUCTURE) PPT BY PRASUN KUMAR
DOUBLE LINKED LIST(DATA STRUCTURE) PPT BY PRASUN KUMAR
 
linked list
linked list linked list
linked list
 
Doubly & Circular Linked Lists
Doubly & Circular Linked ListsDoubly & Circular Linked Lists
Doubly & Circular Linked Lists
 
Linked list
Linked listLinked list
Linked list
 
Linklist
LinklistLinklist
Linklist
 
Linear data structure concepts
Linear data structure conceptsLinear data structure concepts
Linear data structure concepts
 
Doubly linked list
Doubly linked listDoubly linked list
Doubly linked list
 
Data Structures with C Linked List
Data Structures with C Linked ListData Structures with C Linked List
Data Structures with C Linked List
 
Doubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || AlgorithmsDoubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || Algorithms
 
Circular linked list
Circular linked listCircular linked list
Circular linked list
 
Stacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURESStacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURES
 
Linked list implementation of Queue
Linked list implementation of QueueLinked list implementation of Queue
Linked list implementation of Queue
 
Linked list
Linked listLinked list
Linked list
 
Stack project
Stack projectStack project
Stack project
 

Similar a Linkedlist

data structures and applications power p
data structures and applications power pdata structures and applications power p
data structures and applications power pMeghaKulkarni27
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure shameen khan
 
ds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdfds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdfKamranAli649587
 
linked list using c
linked list using clinked list using c
linked list using cVenkat Reddy
 
Linked List in Data Structure
Linked List in Data StructureLinked List in Data Structure
Linked List in Data StructureMeghaj Mallick
 
Deletion from single way linked list and search
Deletion from single way linked list and searchDeletion from single way linked list and search
Deletion from single way linked list and searchEstiak Khan
 
1.3 Linked List.pptx
1.3 Linked List.pptx1.3 Linked List.pptx
1.3 Linked List.pptxssuserd2f031
 
Data Structures_Linked List
Data Structures_Linked ListData Structures_Linked List
Data Structures_Linked ListThenmozhiK5
 
Linked list.pptx
Linked list.pptxLinked list.pptx
Linked list.pptxajajkhan16
 
data structures lists operation of lists
data structures lists operation of listsdata structures lists operation of lists
data structures lists operation of listsmuskans14
 

Similar a Linkedlist (20)

data structures and applications power p
data structures and applications power pdata structures and applications power p
data structures and applications power p
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
 
Linked list (1).pptx
Linked list (1).pptxLinked list (1).pptx
Linked list (1).pptx
 
ds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdfds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdf
 
linked list using c
linked list using clinked list using c
linked list using c
 
Linkedlists
LinkedlistsLinkedlists
Linkedlists
 
Linked list
Linked listLinked list
Linked list
 
Linked List in Data Structure
Linked List in Data StructureLinked List in Data Structure
Linked List in Data Structure
 
Deletion from single way linked list and search
Deletion from single way linked list and searchDeletion from single way linked list and search
Deletion from single way linked list and search
 
Singly linked list
Singly linked listSingly linked list
Singly linked list
 
1.3 Linked List.pptx
1.3 Linked List.pptx1.3 Linked List.pptx
1.3 Linked List.pptx
 
Data Structures_Linked List
Data Structures_Linked ListData Structures_Linked List
Data Structures_Linked List
 
Linked list
Linked listLinked list
Linked list
 
Linked list.pptx
Linked list.pptxLinked list.pptx
Linked list.pptx
 
Linked list.docx
Linked list.docxLinked list.docx
Linked list.docx
 
Linked Lists.pdf
Linked Lists.pdfLinked Lists.pdf
Linked Lists.pdf
 
Lec3-Linked list.pptx
Lec3-Linked list.pptxLec3-Linked list.pptx
Lec3-Linked list.pptx
 
Linked list
Linked listLinked list
Linked list
 
Dounly linked list
Dounly linked listDounly linked list
Dounly linked list
 
data structures lists operation of lists
data structures lists operation of listsdata structures lists operation of lists
data structures lists operation of lists
 

Más de Taslima Yasmin Tarin (15)

Restaurant management system
Restaurant management systemRestaurant management system
Restaurant management system
 
RSA algorithem
RSA algorithemRSA algorithem
RSA algorithem
 
CDMA
CDMACDMA
CDMA
 
Mobile Satellite Communication
Mobile Satellite CommunicationMobile Satellite Communication
Mobile Satellite Communication
 
Application of DSP in Biomedical science
Application of DSP in Biomedical scienceApplication of DSP in Biomedical science
Application of DSP in Biomedical science
 
Real Life Application of Digital Electronics
Real Life Application of Digital ElectronicsReal Life Application of Digital Electronics
Real Life Application of Digital Electronics
 
GPS (Global Positioning System) application
GPS (Global Positioning System) applicationGPS (Global Positioning System) application
GPS (Global Positioning System) application
 
Artificial intelligence chatbot Report
Artificial intelligence chatbot ReportArtificial intelligence chatbot Report
Artificial intelligence chatbot Report
 
AI chatbot for massenger
AI chatbot for massengerAI chatbot for massenger
AI chatbot for massenger
 
file compression/zip file.report
file compression/zip file.reportfile compression/zip file.report
file compression/zip file.report
 
file compression ,zip file
file compression ,zip filefile compression ,zip file
file compression ,zip file
 
Bangali
BangaliBangali
Bangali
 
oscillator
oscillatoroscillator
oscillator
 
farakka barrage
farakka barragefarakka barrage
farakka barrage
 
Operation Amplifire
Operation AmplifireOperation Amplifire
Operation Amplifire
 

Último

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniquesugginaramesh
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 

Último (20)

Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniques
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 

Linkedlist

  • 2. linked list is a linear data structure. • Linked list is a collection of elements called nodes. • Each node contains two parts. they are data part and link part. data link LINKED LISTS
  • 3. • The above figure shows the example of marks obtained by different students can be stored in a linked list Here N-stands for NULL. Null indicates the end of the node. 14 100 30 400 42 N
  • 4. TYPES OF LINKED LISTS 1. Single linked list 2. Double linked list
  • 5. OPERATIONS ON LINKED LISTS The basic operations on linked lists are 1. Creation 2. Insertion 3. Deletion 4. Traversing 5. Searching
  • 6. Creation Insertion There are 3 cases here:- Insertion at the beginning Insertion at the end Insertion after a particular node The creation operation is used to create a linked list
  • 7. Insertion at the beginning There are two steps to be followed:- a)Make the next pointer of the node point towards the first node of the list b)Make the start pointer point towards this new node  If the list is empty simply make the start pointer point towards the new node;
  • 8.
  • 9. Inserting at the end Here we simply need to make the next pointer of the last node point to the new node
  • 10. Inserting after an element Here we again need to do 2 steps :-  Make the next pointer of the node to be inserted point to the next node of the node after which you want to insert the node  Make the next pointer of the node after which the node is to be inserted, point to the node to be inserted
  • 11.
  • 12. Deleting a node Here also we have three cases:-  Deleting the first node Deleting the last node Deleting the intermediate node
  • 13. Deleting the first node Here we apply 2 steps:-  Making the start pointer point towards the 2nd node  Deleting the first node using delete keyword  start threetwoone
  • 14. Deleting the last node start Here we apply 2 steps:-  Making the second last node’s next pointer point to NULL  Deleting the last node via delete keyword node3node2node1
  • 15. Deleting a particular node Here we make the next pointer of the node previous to the node being deleted ,point to the successor node of the node to be deleted and then delete the node using delete keyword node1 node2 node3
  • 16. Searching Traversing Searching operation is a process of accessing the desired node in the list. We start searching node – by-node and compare the data of the node with the key. Traversing operation is a process of going through all the nodes of a linked list from one end to the another end. If we start traversing from the very first node towards the last node , It is called forward traversing.
  • 17. ADVANTAGES OF LINKED LISTS We can dynamically allocate memory space as needed We can release the unused space in the situation where the allocated space seems to be more. Operation related to data elements like insertions or deletion are more simplified. Operation like insertion or deletion are less time consuming. Linked lists provide flexibility in allowing the items to be arranged efficiently.
  • 18. LIMITATIONS OF LINKED LISTS When ever we deal with fixed length lists it would be better to use an array rather than linked list. Linked list will consume more storage space than an array with same number of items this is because each item has an addition link field
  • 19. APPLICATIONS Linked lists are used in many other data structures. Linked lists are used in polynomial manipulation. Representation of trees, stacks, queues. etc.,