10.09.2013 Views

1. Advanced Data Structure using C++

1. Advanced Data Structure using C++

1. Advanced Data Structure using C++

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LECTURE NOTES OF ADVANCED DATA STRUCTURE (MT-CSE 110)<br />

Two_Way_Linked_List T;<br />

head<br />

In the linear linked list, we can only traverse the linked list in one direction. But<br />

sometimes, it is very desirable to traverse a linked list in either a forward or<br />

reverse manner. This property of a linked list implies that each node must<br />

contain two link fields instead of one. The links are used to denote the<br />

predecessor and successor of a node. The link denoting the predecessor of a<br />

node is called the left link, and that denoting its successor its right link. The<br />

Figure 3.1‐01 shows the structure of the node.<br />

A list containing this type of node is called a doubly linked linear list. See Figure<br />

3.1‐02.<br />

Left and Right are pointer variables denoting the left‐most and right‐most nodes<br />

in the list. The left link of the left‐most node and the right link of the right‐most<br />

Prepared By :­<br />

Er. Harvinder Singh<br />

Assist Prof., CSE, H.C.T.M (Kaithal) Page ‐ 113 ‐

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!