An Array Based Implementation of STACK With The Help of Algorithm For Following Functions - Push - Pop
An Array Based Implementation of STACK With The Help of Algorithm For Following Functions - Push - Pop
LabTask(s):
Test the program using the following procedure: STACK of size N=6
2
1. Call PUSH(5)
2. Call PUSH(2)
3. Call PUSH(3)
Departemnent of Computer Sciences 2/4 Semester Spring 2016
CSL-221: Data Structures & Algorithms Lab 05: STACK
4. Call POP()
5. Call PUSH(6)
6. Call PUSH(9)
7. Call PUSH(3)
8. Call DISPLAY()
9. Call TOP()
Elements are added to and removed from the top of the stack (the most recently added items
are at the top of the stack).
The last element to be added is the first to be removed (LIFO: Last In, First Out).
Stack Operation
MakeEmpty
Boolean IsEmpty
Boolean IsFull
Push (ItemTypenewItem)
Pop (ItemType& item) (or pop and top)
Push(ItemTypenewItemId)
Pop(ItemType&Item)
-------------------------------------------------------------END------------------------------------------------------------