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 />

In this structure link field of the last node points the head address of the list and<br />

we obtain a circular linked list structure. In a circular list the next field in the last<br />

node contains a pointer back to the first node rather than the null pointer. From<br />

any point in such a list it is possible to reach any other point in the list.<br />

Note that a circular list does not have a natural “first” or “last” node. We<br />

therefore, establish a first and last node by convention. One useful convention<br />

is to let the external pointer to the circular list point to the last node, and to<br />

allow the following node to be the first node<br />

Doubly Linked list <strong>Structure</strong>.<br />

In this kind of linked list structure each node has two link(pointer) fields, Right<br />

pointer and left pointer. We mostly use this kind of structure for<br />

ordered(sorted) list structure. So it becomes so easy to obtain ascending and<br />

descending order of information. In this structure there are two head nodes.<br />

Which are the beginning points of Left head and Right head.<br />

Prepared By :­<br />

Er. Harvinder Singh<br />

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

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

Saved successfully!

Ooh no, something went wrong!