The Wayback Machine - https://web.archive.org/web/20250115112728/https://www.geeksforgeeks.org/stack-data-structure/
Open In App

Stack Data Structure

Last Updated : 09 Dec, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
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.

Image

Basics of Stack Data Structure

Implementations of Stack in Different Languages

Easy Problems on Stack Data Structures

Medium Problems on Stack Data Structures

Hard Problems on Stack Data Structures

Quick Links :

Recommended:

Unlock your potential with our DSA Self-Paced course, designed to help you master Data Structures and Algorithms at your own pace. In 90 days, you’ll learn the core concepts of DSA, tackle real-world problems, and boost your problem-solving skills, all at a speed that fits your schedule. With comprehensive lessons and practical exercises, this course will set you up for success in technical interviews and beyond.

And here's the challenge – join the Three 90 Challenge! Complete 90% of the course in 90 days, and you’ll earn a 90% refund. It's a great way to stay motivated, track your progress, and reward yourself for your dedication. Start the challenge today, and push your limits to achieve mastery in DSA!


Article Tags :
Practice Tags :

Similar Reads

three90RightbarBannerImg