Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




What is Doubly Linked List or Two Way Linked List or Two Way Chain

In it each node is divided into three parts:

1. The first part is PREV part. It is previous pointer field. It contains the address of the node which is before the current node.
2. The second part is the INFO part. It contains the information of the element.
3. The third part is NEXT part. It is next pointer field. It contains the address of the node which is after the current node.

There are two pointers FIRST and LAST. FIRST points to the first node in the list. LAST points to the last node in the list. The PREV field of first node and the NEXT field of last node contain NULL value. This shows the end of list on both sides. This list can be traversed in both directions that is forward and backward.

It is shown below:

Doubly Linked List or Two Way Linked List or Two Way Chain

Share this article   |    Print    |    Article read by 1572 times
Author:
Rohit kakria
I am software developer, moderator of xpode.com
Related Articles:
Related Interview Questions: No related interview question