What is doubly linked list


Ø  Doubly linked list –
·        A doubly linked list is also called as two way linked list.
·        A doubly linked list is a more complex type of linked list.
·        A doubly linked list contain a node which has three part –
a)     Previous
b)     Data
c)     Next
·        Previous part is used to store the address of previous node.
·        Data part is used to store the data values.
·        Next part is used to store the address of next node in sequence.
·        Pointer start always point first node.
·        Previous part of first node and next part of last node will be always NULL.
·        Next part of each node contains address of successor node.
·        Previous part of each node contains address of predecessor node.
·        If a node contain NULL in the previous part it means it is a first node of the list.
·        If a node contains NULL in the next part it means it is the last node of the list
·        In a doubly linked list a new node is created using following code –
Struct node
{
Struct node *prev;
Int data;
Struct node next;
};

·        In a double linked list, we perform the following operations...
1.      Insertion
2.      Deletion
3.      Display