Stack and operations on It
A stack is a list in which all insertions and deletions are made at one end, called the top of the stack. The last element to be inserted into the stack will be the first to be removed. Thus stacks are sometimes referred to as Last In First Out (LIFO) Data structures.
stacks are used in evaluating expressions, for keeping track of function calls and in recursion etc.
Operations on a stack:
creates an empty stack.
Push (Item) :
pushes an item on the stack.
removes the first item from the stack.
returns the first item from the stack w/o removing it.
returns true if the stack is empty.
returns true if the stack is full.
The condition resulting from trying to push an element onto a full stack.
The condition resulting from trying to pop an empty stack.