Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Stack Data Structure

Stack is a data structure.
Stack is non primitive data structure.
Stack is linear data structure.
Stack is an ordered list.
Stack do push and pop operation from TOS (top of stack).
Stack is LIFO (Last In First Out) type.

What is TOS (Top of Stack)?
Ans. The base of stack is fixed.
Top of stack increases with PUSH operations.
Top of stack decreases with POP operations.
TOS is an end in stack where PUSH and POP operations take place.

When stack is empty and full ?
Ans. When TOS present at the base/bottom of the stack, than stack is empty.
When TOS is present at highest location. When no more PUSH operations can be performed.

Operations on Stack ?
1. PUSH: Inserting a new element in to stack.
2. POP: Deleting an existing element from stack.
3. Create: To create a new stack (empty stack).
4. TOP: To return the top element of the stack.
5. EMPTY: To check stack is empty or not. It returns true if stack is empty else return false.
6. PEEP: To extract information from some location of stack.
7. UPDATE: To update the content of some location in the stack.