SlideShare a Scribd company logo
DATA STRUCTURES 
ASSIGNMENT-I 
DOUBLY LINKED LIST 
TEAM:9 
KARTHICK.D(13MX20) 
KRISHNAN.R(13MX24) 
RAMVIGNESH.M(13MX38) 
YASAR ARAFATH.A(13MX53)
DOUBLY LINKED LIST 
 Doubly linked list consist of set of sequentially linked 
words called nodes. 
 Each nodes contains two fields called links that are 
references to the previous and also to the next node in 
the sequence of nodes. 
 A node in a doubly linked list has atleast three fields 
DATA, LLINK(left link),RLINK(right link).
DOUBLY LINKED LIST REPRESENTATION:
 A doubly linked list may or may not be circular. 
 A special node has been introduced or added along 
with above three nodes called Head node. 
 The DATA Field of head node contains information. 
 P=RLINK(LLINK(P))=LLINK(RLINK(P))
INSERTION: 
 Inserting a node in singly linked list needs connection 
of both forward and backward pointers. 
 To insert in a null linkly list we simply set the head and 
rear pointers to the new node. 
 Then set the forward and backward pointers of new 
node to null.
Example of insertion:
Algorithm: 
Procedure INSERT_DL (X,Y) 
LLINK (X) = Y; 
RLINK (X) = RLINK(Y); 
LLINK (RLINK (Y) ) = X; 
RLINK (Y) = X; 
End INSERT_DL.
Deletion: 
 Inserting between two new nodes needs to be set to 
both its predecessor and its successor. 
 These two nodes must be set to point new node. 
 Once we locate the node to be deleted,we simply 
change its predecessor’s and successor’s pointers. 
 Then the node will be recycled.
Deletion:
ALGORITHM: 
Procedure DELETE_DL (P, X) 
if(X = P) then ABANDON_DELETE; 
else 
{RLINK(LLINK (X) ) = RLINK (X); 
LLINK(RLINK (X) ) = LLINK (X); 
Call RETURN (X); } 
end DELETE_DL.
Thank you…

More Related Content

What's hot

Circular linked list
Circular linked listCircular linked list
Circular linked list
dchuynh
 
linked list using c
linked list using clinked list using c
linked list using c
Venkat Reddy
 
Linked List Static and Dynamic Memory Allocation
Linked List Static and Dynamic Memory AllocationLinked List Static and Dynamic Memory Allocation
Linked List Static and Dynamic Memory Allocation
Prof Ansari
 
Doubly Link List
Doubly Link ListDoubly Link List
Doubly Link List
Kashif Memon
 
Linked list
Linked listLinked list
Linked list
VONI
 
Data Structure (Circular Linked List)
Data Structure (Circular Linked List)Data Structure (Circular Linked List)
Data Structure (Circular Linked List)
Adam Mukharil Bachtiar
 
07.03 cartesian product
07.03 cartesian product07.03 cartesian product
07.03 cartesian product
Bishal Ghimire
 
Data Structure (Dynamic Array and Linked List)
Data Structure (Dynamic Array and Linked List)Data Structure (Dynamic Array and Linked List)
Data Structure (Dynamic Array and Linked List)
Adam Mukharil Bachtiar
 
Doubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || AlgorithmsDoubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || Algorithms
Shubham Sharma
 
Linear data structure concepts
Linear data structure conceptsLinear data structure concepts
Linear data structure concepts
Akila Krishnamoorthy
 
Single linked list
Single linked listSingle linked list
Single linked list
jasbirsingh chauhan
 
Singly & Circular Linked list
Singly & Circular Linked listSingly & Circular Linked list
Singly & Circular Linked list
Khulna University of Engineering & Tecnology
 
Adt of lists
Adt of listsAdt of lists
Adt of lists
Nivegeetha
 
Link List
Link ListLink List
Link List
umiekalsum
 
Team 10
Team 10Team 10
Doubly linked list (animated)
Doubly linked list (animated)Doubly linked list (animated)
Doubly linked list (animated)
DivyeshKumar Jagatiya
 
Data structure , stack , queue
Data structure , stack , queueData structure , stack , queue
Data structure , stack , queue
Rajkiran Nadar
 
Singly link list
Singly link listSingly link list
Singly link list
Rojin Khadka
 
Linked lists
Linked listsLinked lists
Linked lists
SARITHA REDDY
 
Linked list
Linked listLinked list
Linked list
akshat360
 

What's hot (20)

Circular linked list
Circular linked listCircular linked list
Circular linked list
 
linked list using c
linked list using clinked list using c
linked list using c
 
Linked List Static and Dynamic Memory Allocation
Linked List Static and Dynamic Memory AllocationLinked List Static and Dynamic Memory Allocation
Linked List Static and Dynamic Memory Allocation
 
Doubly Link List
Doubly Link ListDoubly Link List
Doubly Link List
 
Linked list
Linked listLinked list
Linked list
 
Data Structure (Circular Linked List)
Data Structure (Circular Linked List)Data Structure (Circular Linked List)
Data Structure (Circular Linked List)
 
07.03 cartesian product
07.03 cartesian product07.03 cartesian product
07.03 cartesian product
 
Data Structure (Dynamic Array and Linked List)
Data Structure (Dynamic Array and Linked List)Data Structure (Dynamic Array and Linked List)
Data Structure (Dynamic Array and Linked List)
 
Doubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || AlgorithmsDoubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || Algorithms
 
Linear data structure concepts
Linear data structure conceptsLinear data structure concepts
Linear data structure concepts
 
Single linked list
Single linked listSingle linked list
Single linked list
 
Singly & Circular Linked list
Singly & Circular Linked listSingly & Circular Linked list
Singly & Circular Linked list
 
Adt of lists
Adt of listsAdt of lists
Adt of lists
 
Link List
Link ListLink List
Link List
 
Team 10
Team 10Team 10
Team 10
 
Doubly linked list (animated)
Doubly linked list (animated)Doubly linked list (animated)
Doubly linked list (animated)
 
Data structure , stack , queue
Data structure , stack , queueData structure , stack , queue
Data structure , stack , queue
 
Singly link list
Singly link listSingly link list
Singly link list
 
Linked lists
Linked listsLinked lists
Linked lists
 
Linked list
Linked listLinked list
Linked list
 

Similar to Team 9

Unit - 2.pdf
Unit - 2.pdfUnit - 2.pdf
Unit - 2.pdf
AravindAnand21
 
LINKED LIST.pptx
LINKED LIST.pptxLINKED LIST.pptx
LINKED LIST.pptx
ManojUniversity
 
Data Structure and Algorithm Lesson 2.pptx
Data Structure and Algorithm Lesson 2.pptxData Structure and Algorithm Lesson 2.pptx
Data Structure and Algorithm Lesson 2.pptx
JoannahClaireAlforqu
 
Linked list
Linked listLinked list
Linked list
Trupti Agrawal
 
MULTIPLICATION OF 2 POLYNOMIALS.pptx
MULTIPLICATION OF 2 POLYNOMIALS.pptxMULTIPLICATION OF 2 POLYNOMIALS.pptx
MULTIPLICATION OF 2 POLYNOMIALS.pptx
AarulMishra
 
2.ppt
2.ppt2.ppt
Abstract data types
Abstract data typesAbstract data types
Abstract data types
JAGDEEPKUMAR23
 
List
ListList
List
Amit Vats
 
linked list
linked list linked list
linked list
Narendra Chauhan
 
dokumen.tips_linked-list-ppt-5584a44be6115.pptx
dokumen.tips_linked-list-ppt-5584a44be6115.pptxdokumen.tips_linked-list-ppt-5584a44be6115.pptx
dokumen.tips_linked-list-ppt-5584a44be6115.pptx
MrMudassir
 
Linked list1.ppt
Linked list1.pptLinked list1.ppt
Linked list1.ppt
KasthuriKAssistantPr
 
Stack & Queue using Linked List in Data Structure
Stack & Queue using Linked List in Data StructureStack & Queue using Linked List in Data Structure
Stack & Queue using Linked List in Data Structure
Meghaj Mallick
 
Data Structure
Data StructureData Structure
Data Structure
HarshGupta663
 
Linked List.ppt Linked List Datastructure concepts
Linked List.ppt Linked List Datastructure conceptsLinked List.ppt Linked List Datastructure concepts
Linked List.ppt Linked List Datastructure concepts
SakkaravarthiShanmug
 
Stack q ll algo
Stack q ll algoStack q ll algo
Stack q ll algo
parthpatel9694
 
02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseo02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseo
JinTaek Seo
 
CH5_Linked List.ppt
CH5_Linked List.pptCH5_Linked List.ppt
CH5_Linked List.ppt
ArifKamal36
 
CH5_Linked List.pptx
CH5_Linked List.pptxCH5_Linked List.pptx
CH5_Linked List.pptx
SaralaT3
 
csc211_lecture_21.pptx
csc211_lecture_21.pptxcsc211_lecture_21.pptx
csc211_lecture_21.pptx
ASADAHMAD811380
 
Array linked list.ppt
Array  linked list.pptArray  linked list.ppt
Array linked list.ppt
Waf1231
 

Similar to Team 9 (20)

Unit - 2.pdf
Unit - 2.pdfUnit - 2.pdf
Unit - 2.pdf
 
LINKED LIST.pptx
LINKED LIST.pptxLINKED LIST.pptx
LINKED LIST.pptx
 
Data Structure and Algorithm Lesson 2.pptx
Data Structure and Algorithm Lesson 2.pptxData Structure and Algorithm Lesson 2.pptx
Data Structure and Algorithm Lesson 2.pptx
 
Linked list
Linked listLinked list
Linked list
 
MULTIPLICATION OF 2 POLYNOMIALS.pptx
MULTIPLICATION OF 2 POLYNOMIALS.pptxMULTIPLICATION OF 2 POLYNOMIALS.pptx
MULTIPLICATION OF 2 POLYNOMIALS.pptx
 
2.ppt
2.ppt2.ppt
2.ppt
 
Abstract data types
Abstract data typesAbstract data types
Abstract data types
 
List
ListList
List
 
linked list
linked list linked list
linked list
 
dokumen.tips_linked-list-ppt-5584a44be6115.pptx
dokumen.tips_linked-list-ppt-5584a44be6115.pptxdokumen.tips_linked-list-ppt-5584a44be6115.pptx
dokumen.tips_linked-list-ppt-5584a44be6115.pptx
 
Linked list1.ppt
Linked list1.pptLinked list1.ppt
Linked list1.ppt
 
Stack & Queue using Linked List in Data Structure
Stack & Queue using Linked List in Data StructureStack & Queue using Linked List in Data Structure
Stack & Queue using Linked List in Data Structure
 
Data Structure
Data StructureData Structure
Data Structure
 
Linked List.ppt Linked List Datastructure concepts
Linked List.ppt Linked List Datastructure conceptsLinked List.ppt Linked List Datastructure concepts
Linked List.ppt Linked List Datastructure concepts
 
Stack q ll algo
Stack q ll algoStack q ll algo
Stack q ll algo
 
02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseo02 linked list_20160217_jintaekseo
02 linked list_20160217_jintaekseo
 
CH5_Linked List.ppt
CH5_Linked List.pptCH5_Linked List.ppt
CH5_Linked List.ppt
 
CH5_Linked List.pptx
CH5_Linked List.pptxCH5_Linked List.pptx
CH5_Linked List.pptx
 
csc211_lecture_21.pptx
csc211_lecture_21.pptxcsc211_lecture_21.pptx
csc211_lecture_21.pptx
 
Array linked list.ppt
Array  linked list.pptArray  linked list.ppt
Array linked list.ppt
 

More from Sathasivam Rangasamy

deque and it applications
deque and it applicationsdeque and it applications
deque and it applications
Sathasivam Rangasamy
 
Team 2
Team 2Team 2
Team 1
Team 1Team 1
linkedlist
linkedlistlinkedlist
single linked list
single linked listsingle linked list
single linked list
Sathasivam Rangasamy
 
Team 6
Team 6Team 6
Team 5
Team 5Team 5
Team 4
Team 4Team 4
Team 3
Team 3Team 3
Loaders
LoadersLoaders

More from Sathasivam Rangasamy (10)

deque and it applications
deque and it applicationsdeque and it applications
deque and it applications
 
Team 2
Team 2Team 2
Team 2
 
Team 1
Team 1Team 1
Team 1
 
linkedlist
linkedlistlinkedlist
linkedlist
 
single linked list
single linked listsingle linked list
single linked list
 
Team 6
Team 6Team 6
Team 6
 
Team 5
Team 5Team 5
Team 5
 
Team 4
Team 4Team 4
Team 4
 
Team 3
Team 3Team 3
Team 3
 
Loaders
LoadersLoaders
Loaders
 

Team 9

  • 1. DATA STRUCTURES ASSIGNMENT-I DOUBLY LINKED LIST TEAM:9 KARTHICK.D(13MX20) KRISHNAN.R(13MX24) RAMVIGNESH.M(13MX38) YASAR ARAFATH.A(13MX53)
  • 2. DOUBLY LINKED LIST  Doubly linked list consist of set of sequentially linked words called nodes.  Each nodes contains two fields called links that are references to the previous and also to the next node in the sequence of nodes.  A node in a doubly linked list has atleast three fields DATA, LLINK(left link),RLINK(right link).
  • 3. DOUBLY LINKED LIST REPRESENTATION:
  • 4.  A doubly linked list may or may not be circular.  A special node has been introduced or added along with above three nodes called Head node.  The DATA Field of head node contains information.  P=RLINK(LLINK(P))=LLINK(RLINK(P))
  • 5. INSERTION:  Inserting a node in singly linked list needs connection of both forward and backward pointers.  To insert in a null linkly list we simply set the head and rear pointers to the new node.  Then set the forward and backward pointers of new node to null.
  • 7. Algorithm: Procedure INSERT_DL (X,Y) LLINK (X) = Y; RLINK (X) = RLINK(Y); LLINK (RLINK (Y) ) = X; RLINK (Y) = X; End INSERT_DL.
  • 8. Deletion:  Inserting between two new nodes needs to be set to both its predecessor and its successor.  These two nodes must be set to point new node.  Once we locate the node to be deleted,we simply change its predecessor’s and successor’s pointers.  Then the node will be recycled.
  • 10. ALGORITHM: Procedure DELETE_DL (P, X) if(X = P) then ABANDON_DELETE; else {RLINK(LLINK (X) ) = RLINK (X); LLINK(RLINK (X) ) = LLINK (X); Call RETURN (X); } end DELETE_DL.