SlideShare une entreprise Scribd logo
1  sur  9
Doubly-Linked List
Doubly Linked List
1.) In doubly linked list each node contains two
pointers.
2.) which points has a reference to both the next point
and pervious point of node in list.
3.) A doubly linked list is a two-way list because one
can move in either from left to right or from right to
left
Info
prev next
NODE
Node Data
 Info : the user’s data.
 Prev, Next : the address of next and
previous node in list
Operations on a Doubly linked list
1) Create list.
2) Insert element at beginning in list.
3) Insert element at end in list.
4) Insert element at any place in list.
5) Delete element from the beginning of list.
6) Delete element from the end of list.
7) Delete element from any place from list.
Create doubly linked list
NULL
7 X
Create One another node
9X X
Insert an element at beginning
doubly linked list
Delete an element at any place
doubly linked list
Doubly Linked list
Advantages
1. We can traverse in
both directions i.e. from
starting to end and as
well as from end to
starting.
2. It is easy to reverse the
linked list.
3. If we are at a node,
then we can go to any
node. But in linear linked
list, it is not possible to
reach the previous node.
Disadvantages
1. It requires more space
per space per node
because one extra field is
required for pointer to
previous node.
2. Insertion and deletion
take more time than
linear linked list because
more pointer operations
are required than linear
linked list.
Doubly Linked List

Contenu connexe

Tendances

Tendances (20)

Data structures using c
Data structures using cData structures using c
Data structures using c
 
Double Linked List (Algorithm)
Double Linked List (Algorithm)Double Linked List (Algorithm)
Double Linked List (Algorithm)
 
Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First Search
 
heap Sort Algorithm
heap  Sort Algorithmheap  Sort Algorithm
heap Sort Algorithm
 
Binary Tree Traversal
Binary Tree TraversalBinary Tree Traversal
Binary Tree Traversal
 
Linked list
Linked listLinked list
Linked list
 
Red black tree
Red black treeRed black tree
Red black tree
 
single linked list
single linked listsingle linked list
single linked list
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURESTACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
 
Trees, Binary Search Tree, AVL Tree in Data Structures
Trees, Binary Search Tree, AVL Tree in Data Structures Trees, Binary Search Tree, AVL Tree in Data Structures
Trees, Binary Search Tree, AVL Tree in Data Structures
 
AVL Tree in Data Structure
AVL Tree in Data Structure AVL Tree in Data Structure
AVL Tree in Data Structure
 
Bubble sort | Data structure |
Bubble sort | Data structure |Bubble sort | Data structure |
Bubble sort | Data structure |
 
Queue in Data Structure
Queue in Data Structure Queue in Data Structure
Queue in Data Structure
 
Linked list
Linked listLinked list
Linked list
 
Queue implementation
Queue implementationQueue implementation
Queue implementation
 
Linked list
Linked listLinked list
Linked list
 
Data Structure and Algorithms Linked List
Data Structure and Algorithms Linked ListData Structure and Algorithms Linked List
Data Structure and Algorithms Linked List
 
Stack
StackStack
Stack
 
Queue data structure
Queue data structureQueue data structure
Queue data structure
 
trees in data structure
trees in data structure trees in data structure
trees in data structure
 

En vedette

Circular linked list
Circular linked listCircular linked list
Circular linked list
dchuynh
 

En vedette (11)

Doubly linked list
Doubly linked listDoubly linked list
Doubly linked list
 
Doubly Linked Lists
Doubly Linked ListsDoubly Linked Lists
Doubly Linked Lists
 
Doubly Link List
Doubly Link ListDoubly Link List
Doubly Link List
 
Doubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || AlgorithmsDoubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || Algorithms
 
Data Structure (Double Linked List)
Data Structure (Double Linked List)Data Structure (Double Linked List)
Data Structure (Double Linked List)
 
Stack using Linked List
Stack using Linked ListStack using Linked List
Stack using Linked List
 
Double linked list
Double linked listDouble linked list
Double linked list
 
Data Structures - Lecture 9 [Stack & Queue using Linked List]
 Data Structures - Lecture 9 [Stack & Queue using Linked List] Data Structures - Lecture 9 [Stack & Queue using Linked List]
Data Structures - Lecture 9 [Stack & Queue using Linked List]
 
Doubly linked list (animated)
Doubly linked list (animated)Doubly linked list (animated)
Doubly linked list (animated)
 
Linked lists
Linked listsLinked lists
Linked lists
 
Circular linked list
Circular linked listCircular linked list
Circular linked list
 

Similaire à Doubly Linked List

Similaire à Doubly Linked List (20)

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 listLinked list
Linked list
 
1.3 Linked List.pptx
1.3 Linked List.pptx1.3 Linked List.pptx
1.3 Linked List.pptx
 
data structures and applications power p
data structures and applications power pdata structures and applications power p
data structures and applications power p
 
Double link list
Double link listDouble link list
Double link list
 
Unit 3 dsa LINKED LIST
Unit 3 dsa LINKED LISTUnit 3 dsa LINKED LIST
Unit 3 dsa LINKED LIST
 
Doubly Linked List
Doubly Linked ListDoubly Linked List
Doubly Linked List
 
Operations on linked list
Operations on linked listOperations on linked list
Operations on linked list
 
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
 
Linked list and its operations - Traversal
Linked list and its operations - TraversalLinked list and its operations - Traversal
Linked list and its operations - Traversal
 
ds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdfds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdf
 
Link list assi
Link list assiLink list assi
Link list assi
 
Linkedlist
LinkedlistLinkedlist
Linkedlist
 
List - Operations and Implementation
List - Operations and ImplementationList - Operations and Implementation
List - Operations and Implementation
 
Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm
 
Link_List.pptx
Link_List.pptxLink_List.pptx
Link_List.pptx
 
Data Structures(Part 1)
Data Structures(Part 1)Data Structures(Part 1)
Data Structures(Part 1)
 
Linked list (introduction) 1
Linked list (introduction) 1Linked list (introduction) 1
Linked list (introduction) 1
 
Introduction to linked lists
Introduction to linked listsIntroduction to linked lists
Introduction to linked lists
 

Dernier

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Dernier (20)

Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 

Doubly Linked List

  • 2. Doubly Linked List 1.) In doubly linked list each node contains two pointers. 2.) which points has a reference to both the next point and pervious point of node in list. 3.) A doubly linked list is a two-way list because one can move in either from left to right or from right to left
  • 3. Info prev next NODE Node Data  Info : the user’s data.  Prev, Next : the address of next and previous node in list
  • 4. Operations on a Doubly linked list 1) Create list. 2) Insert element at beginning in list. 3) Insert element at end in list. 4) Insert element at any place in list. 5) Delete element from the beginning of list. 6) Delete element from the end of list. 7) Delete element from any place from list.
  • 5. Create doubly linked list NULL 7 X Create One another node 9X X
  • 6. Insert an element at beginning doubly linked list
  • 7. Delete an element at any place doubly linked list
  • 8. Doubly Linked list Advantages 1. We can traverse in both directions i.e. from starting to end and as well as from end to starting. 2. It is easy to reverse the linked list. 3. If we are at a node, then we can go to any node. But in linear linked list, it is not possible to reach the previous node. Disadvantages 1. It requires more space per space per node because one extra field is required for pointer to previous node. 2. Insertion and deletion take more time than linear linked list because more pointer operations are required than linear linked list.