Home / Questions / What is Stack and where it can be used?
Explanatory Question

What is Stack and where it can be used?

👁 3,046 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

The stack is a linear data structure which the order LIFO(Last In First Out) or FILO(First In Last Out) for accessing elements. Basic operations of the stack are: Push, Pop, Peek

Applications of Stack:

  1. Infix to Postfix Conversion using Stack
  2. Evaluation of Postfix Expression
  3. Reverse a String using Stack
  4. Implement two stacks in an array
  5. Check for balanced parentheses in an expression