Doubly Linked Lists

Doubly Linked lists eliminates below drawbacks of circular lists –

  1. not able to traverse backward
  2. not able to delete and node given only points to that node.

In a doubly linked list, every node has three fields – left, right and info. Each node has two pointers left and right which points to the left and right nodes as shown below –

Doubly-Linked-Lists

Dynamic Representation in C

struct node{
            int info;
            struct node *left, *right;
             };
     typedef structnode * NODEPTR;