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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Thus, associated with each data item in a linked list representation is a pointer<br />

to the next item. This pointer is often referred to as a link. In general, a node is<br />

a collection of data, <strong>Data</strong>1,…,<strong>Data</strong>n and links Link1,..,Linkm. Each item in a node is<br />

called a field. A field contains either a data item or a link.<br />

Linked <strong>Structure</strong><br />

linked list ‐ A collection of items, called nodes, that can be physically scattered<br />

about memory, not necessarily in consecutive memory locations.<br />

Programmers responsible for maintaining logical order by chaining nodes<br />

together. Each node has two components:<br />

• The element (data object) ‐ (ItemType)<br />

• The link ‐ gives the location of the next node in the list ‐<br />

establishes the logical order.<br />

Node :<br />

Dynamic representation of a list:<br />

Prepared By :­<br />

Er. Harvinder Singh<br />

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

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

Saved successfully!

Ooh no, something went wrong!