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

Application of Linked List structure.<br />

Creation of Symbol Tables:<br />

An important part of compiler is the construction and maintenance of dictionary<br />

containing names of variables and their associated values. Such a dictionary is also<br />

called a symbol table. Symbol table is used in order to get some advantage of<br />

memory space and processing time.<br />

It is an easy matter to construct a very fast symbol‐table system, provided that a<br />

large section of memory is available. In such case a unique memory address is<br />

assigned to each name, where the address is obtained from the arithmetic value<br />

of the characters making up the variable name.<br />

• The most straightforward method of accessing a symbol table is by <strong>using</strong><br />

linear search method. The insertion is fast but referencing is slow.<br />

• Binary search method could be another method which can be used. The<br />

entries in the table are stored in alphabetical or numerically increasing order.<br />

This is considerably better than the search time for the linear search method.<br />

• The other method is hashing method. In this method a function maps a name<br />

into an integer number.<br />

Prepared By :­<br />

Er. Harvinder Singh<br />

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

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

Saved successfully!

Ooh no, something went wrong!