Stack Coding Problems for SDE Interviews Last Updated : 21 Sep, 2025 Comments Improve Suggest changes 14 Likes Like Report A Stack is a linear data structure in which the insertion of a new element and removal of an existing element takes place at the same end, represented as the top of the stack. To learn about Stack Data Structure in detail, please refer to the Tutorial on Stack Data Structure.Easy ProblemsParenthesis CheckerReverse a String using StackPostfix to Prefix Two stacks in an array Delete Middle element from stackReverse individual wordsMedium ProblemsQueue using StacksStack using QueuesStack using single queueEvaluate Postfix ExpressionNext Greater ElementNearest Smaller ElementNext Smaller of next GreaterSort a stack using a temporary stackStock Span ProblemReverse a Stack using recursionInfix to Postfix Delete consecutive same words A Stack with getMin() in O(1) Time Count of Subarrays with first as minimumLength of the longest valid substringIndex of closing bracketNext Greater Frequency ElementMax Diff between nearest smallers Max product of indexes of next greaterThe Celebrity Problem Hard ProblemsValid stack permutationStack with getMin() in O(1) Stack with getRandom() in O(1) Equivalent expressions k stacks in a single arrayLargest rectangular area in a histogram Clone a Stack without Extra Space Custom Browser HistoryMaximum Rectangle with all 1sSort a stack using RecursionStack with findMiddle() and deleteMiddle() Maximum visible peopleCount distinct Max Differences in Subarrays Longest Correct Bracket Subsequence Set Maximum of minimum for every window size Related Articles:DSA TutorialDynamic Programming Coding Problems for InterviewsProblems on Linked List for InterviewsProblems on Queue for Interviews Create Quiz Comment R RishabhPrabhu Follow 14 Improve R RishabhPrabhu Follow 14 Improve Article Tags : Stack DSA Interview-Questions GFG Sheets top-dsa-problems DSA Sheet +2 More Explore DSA FundamentalsLogic Building Problems 2 min read Analysis of Algorithms 1 min read Data StructuresArray Data Structure 3 min read String in Data Structure 2 min read Hashing in Data Structure 2 min read Linked List Data Structure 2 min read Stack Data Structure 2 min read Queue Data Structure 2 min read Tree Data Structure 2 min read Graph Data Structure 3 min read Trie Data Structure 15+ min read AlgorithmsSearching Algorithms 2 min read Sorting Algorithms 3 min read Introduction to Recursion 15 min read Greedy Algorithms 3 min read Graph Algorithms 3 min read Dynamic Programming or DP 3 min read Bitwise Algorithms 4 min read AdvancedSegment Tree 2 min read Binary Indexed Tree or Fenwick Tree 15 min read Square Root (Sqrt) Decomposition Algorithm 15+ min read Binary Lifting 15+ min read Geometry 2 min read Interview PreparationInterview Corner 3 min read GfG160 3 min read Practice ProblemGeeksforGeeks Practice - Leading Online Coding Platform 1 min read Problem of The Day - Develop the Habit of Coding 5 min read Like