Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Stack Data Structure

  • LIFO - Last In First Out

The stack data structure is a sequential collection of elements that follows the principle of LIFO (last in first out).

Ex: Stack of Plates

Stack Operations

  • push(element): Add an element to the top of Stack.

  • pop(): Remove the top element from Stack and return the pop'd value.

  • peek(): Get the value of the top element without removing it.

  • isEmpty(): Check if the stack is empty.

  • size(): Get the number of elements in Stack.

  • print(): Visualize the element in Stack.