SlideShare a Scribd company logo
Presented By:
Warda Aziz (101631058)
Huba Akhtar(101631022)
Shifa Idrees (101631049)
Amber Wajid (101631002)
Group No:
05
Double Linked List
TOC:
• LIST
• LINKED LIST
• PICTORIAL REPRESENTATION
• ADVANTAGES
• DISADVANTAGES
• DOUBLE LINKED LIST
• EXPLANATION
• POINTS TO BE NOTED
• OPERATIONS
• INSERTION
• DELETION
• DISPLAY
• CODE
• ADVANTAGES
• DISADVANTAGES
List???
Definition:
A list is a collection of same type of objects.
It can be :
 linked list
 double linked list
 circular linked list
 double and circular linked list
linked list
Definition:
• A data structure that consists of a sequence of
data record such that in each record there is a
field that contains a reference of next record in
a sequence.
A sequence of data structures, which are connected together via
links. Linked list is a sequence of links which contains items.
Each link contains a connection to another link.
Pictorial Representation
head
node
End
node
ADVANTAGES
4: No need to define
initial size of the list
3: Addition/removal from the mi
ddle
1: Stacks and queues can be impleme
nted
2: Insertion and
deletion is
faster
Disadvantages
More memory than arrays!
sequential order, read from the beginning
time to access individual elements
one way direction
reverse traversing!!!
Double linked list
Definition:
Double linked list is a sequence of elements in
which every element has links to its previous
element and next element in the sequence..
Or
Double linked list is a two-way list because
one can move in either from left to right or fr
om right to left.
Explanation:
Every node has link to its previous node and
next node . So , we can traverse forward by
using next field and can traverse backward by
using previous field. Every node in double linked
list contains three fields.
value of that node
Points to a
previous
node
points to next
node
Example:
N
2
3
1
1
3
2
5N N
Fron
t
P O I N T S T O B E N O T E D :
 In double linked list ,the first node must be always pointed by HEAD.
Always the previous field of the first node must be NULL.
Always the next field of the last node must be NULL.
Operations:
In a double linked list , we perform the following
operations…
1. Insertion
2. Deletion
3. Display
Insertion:
In double linked list ,the insertion operation ca
n be performed in three ways as follows…
1. Inserting At Beginning of the list
2. Inserting At End of the List
3. Inserting At Specific Location in the list
Deletion :
In double linked list ,the deletion operation ca
n be performed in three ways as follows…
1. Deletion At Beginning of the list
2. Deletion At End of the List
3. Deletion At Specific Location in the list
Displaying:
Double linked list can be Displayed
by writing a Piece of Code in your
Program..
Engine
Tail
EngineCabins
• We can Insert a cabin
• We can Remove Cabin in the Same Way
• We can put passengers in the cabin from
different positions
• We can check them out
• We can change them
• We can and have to check its state at each
time
• A Passenger
• A Front Gate Administrator
• A Back Gate Administrator
Value
Previous Node
Next Node
ADVANTAGES:-
1) We can traverse in both direction i.e from
starting to end & as well as from end to starti
ng.
2) It is easy to reverse the linked list.
3) If we are at a node, the we can go at any
node. But in linked list , it is not possible to r
each the previous node.
Disadvantages:
1) it requires more space per node because extra fie
ld is required for pointer to previous node.
2) Insertion and deletion take more time than line a
re linked list because more pointer operations are r
equired than linear linked list

More Related Content

What's hot (20)

Linked lists
Linked lists
SARITHA REDDY
 
linked lists in data structures
linked lists in data structures
DurgaDeviCbit
 
linked list in data structure
linked list in data structure
shameen khan
 
Stacks and Queue - Data Structures
Stacks and Queue - Data Structures
Dr. Jasmine Beulah Gnanadurai
 
Stack and Queue by M.Gomathi Lecturer
Stack and Queue by M.Gomathi Lecturer
gomathi chlm
 
linked list
linked list
Mohaimin Rahat
 
Doubly Linked List
Doubly Linked List
V.V.Vanniaperumal College for Women
 
1.1 binary tree
1.1 binary tree
Krish_ver2
 
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Balwant Gorad
 
Linklist
Linklist
SHEETAL WAGHMARE
 
Linked list
Linked list
MahammadAdil
 
Double ended queue
Double ended queue
jyoti_lakhani
 
Binary search tree operations
Binary search tree operations
Kamran Zafar
 
Data Structure (Queue)
Data Structure (Queue)
Adam Mukharil Bachtiar
 
AVL Tree Data Structure
AVL Tree Data Structure
Afaq Mansoor Khan
 
Data Structures - Lecture 9 [Stack & Queue using Linked List]
Data Structures - Lecture 9 [Stack & Queue using Linked List]
Muhammad Hammad Waseem
 
Types of Tree in Data Structure in C++
Types of Tree in Data Structure in C++
Himanshu Choudhary
 
Deque and its applications
Deque and its applications
Jsaddam Hussain
 
Linked List
Linked List
Ashim Lamichhane
 
Binary search tree(bst)
Binary search tree(bst)
Hossain Md Shakhawat
 

Similar to Double Linked List (Algorithm) (20)

Double link list
Double link list
Amber Wajid
 
DOUBLY LINKEDLIST.PPTXdddddddddddddddddddddddd
DOUBLY LINKEDLIST.PPTXdddddddddddddddddddddddd
shesnasuneer
 
Linked list, Singly link list and its operations
Linked list, Singly link list and its operations
BackiyalakshmiVenkat
 
DOUBLE LINKED LIST(DATA STRUCTURE) PPT BY PRASUN KUMAR
DOUBLE LINKED LIST(DATA STRUCTURE) PPT BY PRASUN KUMAR
PrasunKumar38
 
Linked list
Linked list
sweetysweety8
 
data structures and applications power p
data structures and applications power p
MeghaKulkarni27
 
Linked Lists and its application advantages over arrays
Linked Lists and its application advantages over arrays
VISHALYADAV809458
 
lecture four of data structures :Linked List-ds.ppt
lecture four of data structures :Linked List-ds.ppt
donemoremaregere376
 
Dounly linked list
Dounly linked list
NirmalPandey23
 
ds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdf
KamranAli649587
 
Linked list (introduction) 1
Linked list (introduction) 1
DrSudeshna
 
Linked list (1).pptx
Linked list (1).pptx
rajveersingh643731
 
Doubly linklist
Doubly linklist
International Islamic University
 
linked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy Tutorial
Afzal Badshah
 
Linkedlist
Linkedlist
Taslima Yasmin Tarin
 
Link list
Link list
Didar Rashad
 
Link list
Link list
Didar Rashad
 
linked list_MODULE 3.pptx ppt on the linked list
linked list_MODULE 3.pptx ppt on the linked list
AnuragKumar682871
 
Linked lists linked lists vs Arrays.pptx
Linked lists linked lists vs Arrays.pptx
Sahar160629
 
Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm
KristinaBorooah
 
Double link list
Double link list
Amber Wajid
 
DOUBLY LINKEDLIST.PPTXdddddddddddddddddddddddd
DOUBLY LINKEDLIST.PPTXdddddddddddddddddddddddd
shesnasuneer
 
Linked list, Singly link list and its operations
Linked list, Singly link list and its operations
BackiyalakshmiVenkat
 
DOUBLE LINKED LIST(DATA STRUCTURE) PPT BY PRASUN KUMAR
DOUBLE LINKED LIST(DATA STRUCTURE) PPT BY PRASUN KUMAR
PrasunKumar38
 
data structures and applications power p
data structures and applications power p
MeghaKulkarni27
 
Linked Lists and its application advantages over arrays
Linked Lists and its application advantages over arrays
VISHALYADAV809458
 
lecture four of data structures :Linked List-ds.ppt
lecture four of data structures :Linked List-ds.ppt
donemoremaregere376
 
ds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdf
KamranAli649587
 
Linked list (introduction) 1
Linked list (introduction) 1
DrSudeshna
 
linked list in Data Structure, Simple and Easy Tutorial
linked list in Data Structure, Simple and Easy Tutorial
Afzal Badshah
 
linked list_MODULE 3.pptx ppt on the linked list
linked list_MODULE 3.pptx ppt on the linked list
AnuragKumar682871
 
Linked lists linked lists vs Arrays.pptx
Linked lists linked lists vs Arrays.pptx
Sahar160629
 
Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm
KristinaBorooah
 
Ad

More from Huba Akhtar (11)

Presentation Skills
Presentation Skills
Huba Akhtar
 
Composition in OOP
Composition in OOP
Huba Akhtar
 
Pakistan culture
Pakistan culture
Huba Akhtar
 
Programmable logic array
Programmable logic array
Huba Akhtar
 
Project proposal
Project proposal
Huba Akhtar
 
Lahore Resolution..
Lahore Resolution..
Huba Akhtar
 
Islamic Civilization
Islamic Civilization
Huba Akhtar
 
Significance and importance of studying the life of prophet (autosaved)
Significance and importance of studying the life of prophet (autosaved)
Huba Akhtar
 
Basics of c++
Basics of c++
Huba Akhtar
 
Para-Language
Para-Language
Huba Akhtar
 
Listening-Skills Helpful Presentation
Listening-Skills Helpful Presentation
Huba Akhtar
 
Presentation Skills
Presentation Skills
Huba Akhtar
 
Composition in OOP
Composition in OOP
Huba Akhtar
 
Pakistan culture
Pakistan culture
Huba Akhtar
 
Programmable logic array
Programmable logic array
Huba Akhtar
 
Project proposal
Project proposal
Huba Akhtar
 
Lahore Resolution..
Lahore Resolution..
Huba Akhtar
 
Islamic Civilization
Islamic Civilization
Huba Akhtar
 
Significance and importance of studying the life of prophet (autosaved)
Significance and importance of studying the life of prophet (autosaved)
Huba Akhtar
 
Listening-Skills Helpful Presentation
Listening-Skills Helpful Presentation
Huba Akhtar
 
Ad

Recently uploaded (20)

Matt Ridley: Economic Evolution and Ideas that have Sex
Matt Ridley: Economic Evolution and Ideas that have Sex
Conservative Institute / Konzervatívny inštitút M. R. Štefánika
 
Hybridization science exhibition ppt.pptx
Hybridization science exhibition ppt.pptx
riturathee9981
 
Agriculture fruit production for crrot candy amala candy banana sudi stem borrer
Agriculture fruit production for crrot candy amala candy banana sudi stem borrer
kanopatel8840
 
Struktur DNA dan kromosom dalam genetika
Struktur DNA dan kromosom dalam genetika
WiwitProbowati2
 
Primary and Secondary immune modulation.pptx
Primary and Secondary immune modulation.pptx
devikasanalkumar35
 
Antibiotic and herbicide Resistance Genes
Antibiotic and herbicide Resistance Genes
AkshitRawat20
 
To study the factors on which the self-inductance of the coil depends by obse...
To study the factors on which the self-inductance of the coil depends by obse...
crazycompetitor000
 
the presentation on pyruvate dehydrogenase complex (PDH).pptx
the presentation on pyruvate dehydrogenase complex (PDH).pptx
aanchalm373
 
How STEM Labs Are Revolutionizing Education
How STEM Labs Are Revolutionizing Education
yashfotonvr
 
Metabolic acidosis and alkalosis ppt.pptx
Metabolic acidosis and alkalosis ppt.pptx
aanchalm373
 
Pathophysiology_Unit1_BPharm CELL INJURY
Pathophysiology_Unit1_BPharm CELL INJURY
KRUTIKA CHANNE
 
Cryptocurrency and cyber crime Presentation
Cryptocurrency and cyber crime Presentation
IqraRehaman
 
Molecular biology and pellet weight marked
Molecular biology and pellet weight marked
nandanitiwari82528
 
Introduction to Microbiology and Microscope
Introduction to Microbiology and Microscope
vaishrawan1
 
Pushkar camel fest at college campus placement 2
Pushkar camel fest at college campus placement 2
nandanitiwari82528
 
Morphological and biochemical characterization in Rice
Morphological and biochemical characterization in Rice
AbhishekChauhan911496
 
Pneumonia Presentation for CPG Review and Mastery
Pneumonia Presentation for CPG Review and Mastery
JayricDepalobos
 
Synthesis and characterization of Thiazole derivatives of N-substituted lsatin
Synthesis and characterization of Thiazole derivatives of N-substituted lsatin
Professional Content Writing's
 
pollination njnjnjnjnjnjjnjnjnjnjnjnjnnj
pollination njnjnjnjnjnjjnjnjnjnjnjnjnnj
bhg31shagnik
 
instrument of surgery help for the practical
instrument of surgery help for the practical
radialcarpoulnaris
 
Hybridization science exhibition ppt.pptx
Hybridization science exhibition ppt.pptx
riturathee9981
 
Agriculture fruit production for crrot candy amala candy banana sudi stem borrer
Agriculture fruit production for crrot candy amala candy banana sudi stem borrer
kanopatel8840
 
Struktur DNA dan kromosom dalam genetika
Struktur DNA dan kromosom dalam genetika
WiwitProbowati2
 
Primary and Secondary immune modulation.pptx
Primary and Secondary immune modulation.pptx
devikasanalkumar35
 
Antibiotic and herbicide Resistance Genes
Antibiotic and herbicide Resistance Genes
AkshitRawat20
 
To study the factors on which the self-inductance of the coil depends by obse...
To study the factors on which the self-inductance of the coil depends by obse...
crazycompetitor000
 
the presentation on pyruvate dehydrogenase complex (PDH).pptx
the presentation on pyruvate dehydrogenase complex (PDH).pptx
aanchalm373
 
How STEM Labs Are Revolutionizing Education
How STEM Labs Are Revolutionizing Education
yashfotonvr
 
Metabolic acidosis and alkalosis ppt.pptx
Metabolic acidosis and alkalosis ppt.pptx
aanchalm373
 
Pathophysiology_Unit1_BPharm CELL INJURY
Pathophysiology_Unit1_BPharm CELL INJURY
KRUTIKA CHANNE
 
Cryptocurrency and cyber crime Presentation
Cryptocurrency and cyber crime Presentation
IqraRehaman
 
Molecular biology and pellet weight marked
Molecular biology and pellet weight marked
nandanitiwari82528
 
Introduction to Microbiology and Microscope
Introduction to Microbiology and Microscope
vaishrawan1
 
Pushkar camel fest at college campus placement 2
Pushkar camel fest at college campus placement 2
nandanitiwari82528
 
Morphological and biochemical characterization in Rice
Morphological and biochemical characterization in Rice
AbhishekChauhan911496
 
Pneumonia Presentation for CPG Review and Mastery
Pneumonia Presentation for CPG Review and Mastery
JayricDepalobos
 
Synthesis and characterization of Thiazole derivatives of N-substituted lsatin
Synthesis and characterization of Thiazole derivatives of N-substituted lsatin
Professional Content Writing's
 
pollination njnjnjnjnjnjjnjnjnjnjnjnjnnj
pollination njnjnjnjnjnjjnjnjnjnjnjnjnnj
bhg31shagnik
 
instrument of surgery help for the practical
instrument of surgery help for the practical
radialcarpoulnaris
 

Double Linked List (Algorithm)

  • 1. Presented By: Warda Aziz (101631058) Huba Akhtar(101631022) Shifa Idrees (101631049) Amber Wajid (101631002) Group No: 05 Double Linked List
  • 2. TOC: • LIST • LINKED LIST • PICTORIAL REPRESENTATION • ADVANTAGES • DISADVANTAGES • DOUBLE LINKED LIST • EXPLANATION • POINTS TO BE NOTED • OPERATIONS • INSERTION • DELETION • DISPLAY • CODE • ADVANTAGES • DISADVANTAGES
  • 4. Definition: A list is a collection of same type of objects. It can be :  linked list  double linked list  circular linked list  double and circular linked list
  • 6. Definition: • A data structure that consists of a sequence of data record such that in each record there is a field that contains a reference of next record in a sequence.
  • 7. A sequence of data structures, which are connected together via links. Linked list is a sequence of links which contains items. Each link contains a connection to another link.
  • 9. ADVANTAGES 4: No need to define initial size of the list 3: Addition/removal from the mi ddle 1: Stacks and queues can be impleme nted 2: Insertion and deletion is faster
  • 10. Disadvantages More memory than arrays! sequential order, read from the beginning time to access individual elements one way direction reverse traversing!!!
  • 12. Definition: Double linked list is a sequence of elements in which every element has links to its previous element and next element in the sequence.. Or Double linked list is a two-way list because one can move in either from left to right or fr om right to left.
  • 13. Explanation: Every node has link to its previous node and next node . So , we can traverse forward by using next field and can traverse backward by using previous field. Every node in double linked list contains three fields.
  • 14. value of that node Points to a previous node points to next node
  • 16. P O I N T S T O B E N O T E D :  In double linked list ,the first node must be always pointed by HEAD. Always the previous field of the first node must be NULL. Always the next field of the last node must be NULL.
  • 17. Operations: In a double linked list , we perform the following operations… 1. Insertion 2. Deletion 3. Display
  • 18. Insertion: In double linked list ,the insertion operation ca n be performed in three ways as follows… 1. Inserting At Beginning of the list 2. Inserting At End of the List 3. Inserting At Specific Location in the list
  • 19. Deletion : In double linked list ,the deletion operation ca n be performed in three ways as follows… 1. Deletion At Beginning of the list 2. Deletion At End of the List 3. Deletion At Specific Location in the list
  • 20. Displaying: Double linked list can be Displayed by writing a Piece of Code in your Program..
  • 22. • We can Insert a cabin • We can Remove Cabin in the Same Way • We can put passengers in the cabin from different positions • We can check them out • We can change them • We can and have to check its state at each time
  • 23. • A Passenger • A Front Gate Administrator • A Back Gate Administrator Value Previous Node Next Node
  • 24. ADVANTAGES:- 1) We can traverse in both direction i.e from starting to end & as well as from end to starti ng. 2) It is easy to reverse the linked list. 3) If we are at a node, the we can go at any node. But in linked list , it is not possible to r each the previous node.
  • 25. Disadvantages: 1) it requires more space per node because extra fie ld is required for pointer to previous node. 2) Insertion and deletion take more time than line a re linked list because more pointer operations are r equired than linear linked list