Flat Preloader Icon

Stack

Overview

  1. what is STACK?
  2. Operations on STACK
  3. Ways to implement STACK

What is stack?

  • stack is a linear data structure
  • stack’s working principle is last in  fisrt out(LIFO)

Real world examples of stack:

Programming world examples of stack:

 

Operations On stack

  • Insert  PUSH()
  • Delete POP()
  • View top element PEEK()

Ways To Implement Stack

  • Using arrays
  • Using DYN Arrays
  • Using Linked List