Doubly linked List Intro
Doubly linked list
Doubly linked list is similar to singly link list , only the difference being it has one more pointer variable which points to the previous node. This provides us flexibility to traverse the list in both the direction when required in special cases. However doubly linked list is not solution for all kind of problem as it has overhead of maintaining one more variable inside every node. Below diagram represent doubly linked list.
Note : since the linked list first element is pointed by the start pointer so the previous of first node is NULL ( as start is pointer and not a node). The last node next will have NULL. This will indicate end of the list.
Comments
Post a Comment