தரவ கடடடமமபடப | இரடடமட மறடறமட வடடடமமன
இமணகடகபடபடடட வரரமச
பப.மகமலடடசமர
Data Structures | Double and Circular
Linked List
Data Structures -
Double and Circular Linked List
Mahalakshmi P
What is Double Linked List?
Double linked list is a sequence of elements in which
every element has links to its previous element and
next element in the sequence.
Difference
● single linked list
● every node has a link to
its next node in the
sequence.
● we can traverse from one
node to another node
only in one direction
● we can not traverse back
● double linked list
● every node has a link to
its previous node and
next node.
● So, we can traverse
forward by using the
next field and can
traverse backward by
using the previous field
Node Structure
Important Points to be Remembered
● 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
At Beginning of the list
● Insertion At End of the list
At Specific location in the
list
Operation
At Beginning of the list
At End of the list
At Specific location in the
list
Deletion
Applications/Uses of doubly linked list
in real life
● Doubly linked list can be used in navigation systems
where both front and back navigation is required.
● It is used by browsers to implement backward and
forward navigation of visited web pages i.e. back and
forward button.
● It is also used by various application to implement Undo
and Redo functionality.
● It can also be used to represent deck of cards in games.
● It is also used to represent various states of a game.
Circular Linked List
● A circular linked list is basically a linear linked list
that may be singly or doubly.
● The only difference is that there is no any NULL
value terminating the list.
● every node points to the next node and last node
points to the first node which forms circle.
● whole node can be traversed from any node.
Basic structure of Circular linked list
Singly Circular linked list
Doubly Circular Linked List
●Applications/Uses of Circular linked
list in real life
● Circular lists are used in applications where the
entire list is accessed one-by-one in a loop.
Example: Operating systems may use it to switch
between various running applications in a circular
loop.
● Multiplayer games uses circular list to swap between
players in a loop.
Reference
● https://codeforwin.org/2015/11/circular-linked-list-d
ata-structure.html
● http://btechsmartclass.com/data_structures/circular-l
inked-list.html

double linked list

  • 1.
    தரவ கடடடமமபடப |இரடடமட மறடறமட வடடடமமன இமணகடகபடபடடட வரரமச பப.மகமலடடசமர Data Structures | Double and Circular Linked List
  • 2.
    Data Structures - Doubleand Circular Linked List Mahalakshmi P
  • 3.
    What is DoubleLinked List? Double linked list is a sequence of elements in which every element has links to its previous element and next element in the sequence.
  • 4.
    Difference ● single linkedlist ● every node has a link to its next node in the sequence. ● we can traverse from one node to another node only in one direction ● we can not traverse back ● double linked list ● every node has a link to its previous node and next node. ● So, we can traverse forward by using the next field and can traverse backward by using the previous field
  • 5.
  • 6.
    Important Points tobe Remembered ● 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.
  • 7.
    Operations At Beginning ofthe list ● Insertion At End of the list At Specific location in the list
  • 8.
    Operation At Beginning ofthe list At End of the list At Specific location in the list Deletion
  • 9.
    Applications/Uses of doublylinked list in real life ● Doubly linked list can be used in navigation systems where both front and back navigation is required. ● It is used by browsers to implement backward and forward navigation of visited web pages i.e. back and forward button. ● It is also used by various application to implement Undo and Redo functionality. ● It can also be used to represent deck of cards in games. ● It is also used to represent various states of a game.
  • 10.
    Circular Linked List ●A circular linked list is basically a linear linked list that may be singly or doubly. ● The only difference is that there is no any NULL value terminating the list. ● every node points to the next node and last node points to the first node which forms circle. ● whole node can be traversed from any node.
  • 11.
    Basic structure ofCircular linked list Singly Circular linked list Doubly Circular Linked List
  • 12.
    ●Applications/Uses of Circularlinked list in real life ● Circular lists are used in applications where the entire list is accessed one-by-one in a loop. Example: Operating systems may use it to switch between various running applications in a circular loop. ● Multiplayer games uses circular list to swap between players in a loop.
  • 13.