6 Stack
6 Stack
1
Stack
A stack is linear list in which all additions and deletions are restricted to
one end, called top
If you insert a data series into a stack and then remove it, the order of
the data will be reverse. i.e. data input as {5,10,15,20} is removed as
{20,15,10,5}
For this reversing attribute stack is called LIFO- Last in First out
The stack concept is introduced and three basic stack operations are discussed.
• Push
• Pop
• Stack Top
• Data Structure
• ADT Implemenation