
Stacks are useful for function calls, storing the activation records and deleting them after returning from the function.Stacks are used for conversion of one arithmetic notation to another arithmetic notation.Stacks are used for backtracking and parenthesis matching.

Stack is used for evaluating expression with operands and operations.If we try to pop from an empty stack then it is known as underflow and if we try to push an element in a stack that is already full, then it is known as overflow. When we want to insert an element into the stack the operation is known as the push operation whereas when we want to remove an element from the stack the operation is known as the pop operation. In order to make manipulations in a stack, there are certain operations provided to us. Some of its main operations are: push(), pop(), top(), isEmpty(), size(), etc. It can be implemented through an array or linked lists. The plate which we put last is on the top and since we remove the plate that is at the top, we can say that the plate that was put last comes out first. You can take a pile of plates kept on top of each other as a real-life example. Stack follows the LIFO(Last In First Out) strategy that states that the element that is inserted last will come out first.

Stack is a simple linear data structure used for storing data.
Stack the states live full#

