Doubly Linked List

Doubly linked list is an extension of singly linked list, which includes the a pointer to the previous node in addition to next node pointer in case of Singly linked list.

doublyll.jpg

Due to this design, following additional benefits are gained by Doubly linked lists:

  1. Returning to the back node becomes easier, as we already have a pointer to back node in the current node itself.
  2. Insertion before the current node becomes easy due to previous pointer.
  3. Deletion before the current node becomes easy.

You can download the full C language source code for demonstration of the operations on Doubly Linked List here: (Lnklist2.cpp (6.21 KB))


Copyright Satya Services - 2008