In computer science, a stack is a sequential collection of items, in which the last item placed on the stack, will be the first item removed.

Stack exhibits following properties

  • LIFO(last in first out)
  • push
  • pop
  • underflow
  • overflow

Common examples like undo operation in a text editor, back button in a browser etc