Introduction to Stack


A stack is a simple computational device with two operations:

  • push
  • pop

These operations allow us to pile up data to remember it in LIFO (last in first out) manner, and quickly retrieve the last piled data item as shown below:

Get hands-on with 1200+ tech skills courses.