Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.3k+ articles
Experiences
17k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
Amazon
1.8k+ articles
Tree
1.4k+ articles
Data Structures
1.1k+ articles
Queue
360+ articles
cpp-stack
78 articles
DSA
>
Data Structures
>
Stack
Stack
420+ posts
Popular Articles
Recent Articles
Stack Data Structure
Last Updated: 27 March 2025
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 Firs
...read more
Stack
DSA
Data Structure Types, Classifications and Applications
Last Updated: 11 February 2025
A data structure is a storage that is used to store and organize data. It is a way of arranging data on a computer so that it can be accesse
...read more
Arrays
Strings
Linked List
Tree
Graph
Stack
Queue
Data Structures
DSA
DSA-Blogs
Implement a stack using singly linked list
Last Updated: 20 March 2025
To implement a stack using a singly linked list, we need to ensure that all operations follow the LIFO (Last In, First Out) principle. This
...read more
Linked List
Stack
Technical Scripter
Technical Scripter 2018
DSA
Similar Topics
DSA
22.3k+ articles
Experiences
17k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
Amazon
1.8k+ articles
Tree
1.4k+ articles
Data Structures
1.1k+ articles
Queue
360+ articles
cpp-stack
78+ articles
What is Stack Data Structure? A Complete Tutorial
Last Updated: 06 March 2025
Stack is a linear data structure that follows LIFO (Last In First Out) Principle, the last element inserted is the first to be popped out.
...read more
Stack
DSA
DSA Tutorials
Stack in C++ STL
Last Updated: 28 February 2025
In C++, stack container follows LIFO (Last In First Out) order of insertion and deletion. It means that most recently inserted element is re
...read more
Stack
STL
C++
cpp-containers-library
cpp-stack
cpp-stack-functions
Trapping Rain Water Problem - Tutorial with Illustrations
Last Updated: 07 April 2025
Trapping Rainwater Problem states that given an array of n non-negative integers arr[] representing an elevation map where the width of each
...read more
Arrays
Microsoft
Amazon
Adobe
D-E-Shaw
Accolite
Payu
MakeMyTrip
Stack
two-pointer-algorithm
DSA
Evaluation of Postfix Expression
Last Updated: 28 February 2025
Given a postfix expression, the task is to evaluate the postfix expression. A Postfix expression is of the form "a b operator" ("a b +") i.e
...read more
Amazon
Stack
expression-evaluation
DSA
Program for Tower of Hanoi Algorithm
Last Updated: 17 February 2025
Tower of Hanoi is a mathematical puzzle where we have three rods (A, B, and C) and N disks. Initially, all the disks are stacked in decreasi
...read more
Stack
Divide and Conquer
Recursion
DSA
Basic Coding Problems
Infix to Postfix Expression
Last Updated: 27 April 2025
Write a program to convert an Infix expression to Postfix form.Infix expression: The expression of the form "a operator b" (a + b) i.e., whe
...read more
Amazon
Samsung
VMWare
Paytm
Stack
expression-evaluation
DSA
Merge Overlapping Intervals
Last Updated: 26 March 2025
Given an array of time intervals where arr[i] = [starti, endi], the task is to merge all the overlapping intervals into one and output the r
...read more
Arrays
Amazon
Google
Stack
DSA
Interval
Implement Stack using Queues
Last Updated: 25 March 2025
Implement a stack using queues. The stack should support the following operations:Push(x): Push an element onto the stack.Pop(): Pop the ele
...read more
Amazon
Adobe
Oracle
D-E-Shaw
Snapdeal
Accolite
CouponDunia
Kritikal Solutions
Grofers
Stack
Queue
DSA
Next Greater Element (NGE) for every element in given Array
Last Updated: 12 February 2025
Given an arrayarr[]of integers, the task is to find the Next Greater Element for each element of the array in order of their appearance in t
...read more
Arrays
Amazon
Samsung
Snapdeal
Payu
Zoho
Informatica
CouponDunia
Stack
DSA
Valid Parentheses in an Expression
Last Updated: 13 January 2025
Given a stringsrepresenting an expression containing various types of brackets: {}, (), and [], the task is to determine whether the bracket
...read more
Strings
Amazon
Oracle
Walmart
Yatra.com
Snapdeal
Zoho
Hike
Stack
Wipro
Parentheses-Problems
DSA
Inorder Tree Traversal without Recursion
Last Updated: 06 November 2024
Given a binary tree, the task is to perform in-order traversal of the tree without using recursion.Example:Input:Output: 4 2 5 1 3Explanatio
...read more
Tree
tree-traversal
Stack
DSA
Queue using Stacks
Last Updated: 28 March 2025
Given a stack that supports push and pop operations, your task is to implement a queue using one or more instances of that stack along with
...read more
Microsoft
Amazon
Adobe
Morgan Stanley
Oracle
Flipkart
Goldman Sachs
D-E-Shaw
Walmart
Accolite
InMobi
MAQ Software
MakeMyTrip
InfoEdge
Stack
Queue
STL
DSA
1
2
3
4
5
6
7
8
>>
Last
1
2
3
4
5
6
>>
Last
1
2
3
4
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !