A QUICK GUIDE TO STACK

Stack could also be a linear arrangement which follows a selected order during which the operations are performed. The order could even be LIFO(Last In First Out) or FILO(First In Last Out).

Some key points related to stack

  • it’s called as stack because it behaves kind of a real­world stack, piles of books, etc.
  • A Stack is an abstract data type with a pre­defined capacity, which suggests that it can store the weather of a limited size.
  • it is a knowledge structure that follows some order to insert and delete the weather , which order are often LIFO or FILO.

Real Time Examples of Stack

  • The stack of trays during a cafeteria.
  • A hottest example of stack is plates in marriage party. Fresh plates are pushed onto to the very best and popped from the very best .
  • A driveway that’s only one car wide Stack Operation.

STACK OPERATIONS

In stack arrangement mainly perform two operation; push and pop

pop: just just in case of stack deletion of any item from stack is known as pop.

push: just just in case of stack Insertion of any item in stack is known as push.

USE OF STACK

  • Memory management and run­time environment for nested language features of stack.
  • To reverse a word. You push a given word to stack ­ letter by letter ­ then pop letters from the stack.
  • Back/Forward on browsers are perform using stacks.

Leave a Comment

Your email address will not be published. Required fields are marked *