# Stack Basics
Stack is a data structure which follows LIFO i.e. Last-In-First-Out method.
The data/element which is stored last in the stack i.e. the element at top will be accessed first.
Insertion and deletion both take place at the top.
Operations
push()
– Adding element to stack.pop()
– removing element from stack.top()
– to get the element at top.empty()
– to check if the stack is empty or not.
Applications
- Undo operation in text editors.
- Expression evaluation - evaluation of arithmatic expressions.
- Expression conversion – Infix , postfix & prefix.
- Recursion / Function calls.