Stacks in Data Structures:
Basic Stack Operations:
- New() : Creates a new Stack.
- Push() : Inserts Object or element in the top of the stack.
- Pop() : Deletes Object or element from the top of the stack.
- Peek() : Returns the Object or element in the top of the Stack but does not delete it from the Stack.
- Size() : Returns the number of Object or element in the Stack i.e. Size of the Stack
- IsEmpty() : It is a Boolean Function, It Indicates that the Stack is empty or not.