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

PUSH OPERATION:<br />

The process of adding a new element to the top of stack is known as PUSH<br />

OPERATION.<br />

Pushing an element in the is done at the top pointer and it is incremented by<br />

one. If array is full and no new element can be accommodated this condition is<br />

known as STACK FULL CONDITION. It is also called as<br />

STACK OVERFLOW.<br />

POP OPERATION:<br />

The process of deleting an element from top of stack is known as POP<br />

OPERATION. Each time after pop operation the stack pointer i.e. top is<br />

decremented by one.<br />

If there is no element on the stack then the pop operation can’t be<br />

performed. This condition is known as STACK EMPTY CONDITION which is also<br />

called as STACK UNDER FLOW CONDITION.<br />

Prepared By :­<br />

Er. Harvinder Singh<br />

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

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

Saved successfully!

Ooh no, something went wrong!