Nothing Special   »   [go: up one dir, main page]

Open In App

Stack Data Structure

Last Updated : 05 Mar, 2025
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Share
Report
News Follow

A Stack is a linear data structure that follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out). LIFO implies that the element that is inserted last, comes out first and FILO implies that the element that is inserted first, comes out last.

It behaves like a stack of plates, where the last plate added is the first one to be removed. Think of it this way:

  • Pushing an element onto the stack is like adding a new plate on top.
  • Popping an element removes the top plate from the stack.

Basics of Stack Data StructureImplementations of Stack in Different LanguagesEasy Problems on Stack Data StructuresMedium Problems on Stack Data StructuresHard Problems on Stack Data Structures

Quick Links :

Recommended:


Article Tags :
Practice Tags :

Similar Reads

three90RightbarBannerImg