Stack is a commonly used abstract data type which works on the principle of LIFO(Last in First out) It has two major operations, namely PUSH and POP.
PUSH adds an element at the top of the stack and
POP removes an element from top of the stack. Software implementations of the stack are done using arrays and linked lists. Many programming languages provide built-in features to support stack implementation.
- Applications of Stack
- Expression Evaluation and Conversion
- Backtracking
- Function Call
- Parenthesis Checking
- String Reversal
- Syntax Parsing
- Memory Management
Lets develop good understanding of STACKS and its various operation. [Click the following links to watch the video]
- What is STACK data Structure [read text]
- How to Implement PUSH and POP operations using Linked List And Arrays [read text]
- How to Implement Parenthesis Checker using Stack
- How to Convert INFIX to POSTFIX expression [read text]
- How to Evaluate Postfix Expressions
- How to Convert Infix Expression to Prefix Expression- Method1
- How to covert Infix Expression to Prefix Expression using Postfix Expression
- How to Evaluate Prefix Expression- Algorithm with Example
You are invited to raise queries by writing your question in the box given below
In computing, a stack is a data structure used to store a collection of objects. Individual items can be added and stored in a stack using a push operation. Stacks have several applications in commuter programming. For example, Stack can be used to retrieve recently used objects, from a cache.
The stack is one of the most important data structure in computer science. They store elements consecutively from the bottom till the top. It looks like a pile of books. They are based on LIFO(Last in First out). It means that manipulation is possible only with the last element on the stack. Stacks are implemented by either arrays or linked lists.