← back
Stack
146 questions · 0 seen
All Stack problems
Stack
1
Actions
⊣ Practice
Stack
⊣ Quiz
Stack
Problems
⊣ 20 Valid Parentheses
Easy
⊣ 32 Longest Valid Parentheses
Hard
⊣ 42 Trapping Rain Water
Hard
⊣ 71 Simplify Path
Medium
⊣ 84 Largest Rectangle in Histogram
Hard
⊣ 85 Maximal Rectangle
Hard
⊣ 94 Binary Tree Inorder Traversal
Easy
⊣ 114 Flatten Binary Tree to Linked List
Medium
⊣ 143 Reorder List
Medium
⊣ 144 Binary Tree Preorder Traversal
Easy
⊣ 145 Binary Tree Postorder Traversal
Easy
⊣ 150 Evaluate Reverse Polish Notation
Medium
⊣ 155 Min Stack
Medium
⊣ 173 Binary Search Tree Iterator
Medium
⊣ 224 Basic Calculator
Hard
⊣ 225 Implement Stack using Queues
Easy
⊣ 227 Basic Calculator II
Medium
⊣ 232 Implement Queue using Stacks
Easy
⊣ 234 Palindrome Linked List
Easy
⊣ 316 Remove Duplicate Letters
Medium
⊣ 321 Create Maximum Number
Hard
⊣ 331 Verify Preorder Serialization of a Binary Tree
Medium
⊣ 341 Flatten Nested List Iterator
Medium
⊣ 385 Mini Parser
Medium
⊣ 388 Longest Absolute File Path
Medium
⊣ 394 Decode String
Medium
⊣ 402 Remove K Digits
Medium
⊣ 445 Add Two Numbers II
Medium
⊣ 456 132 Pattern
Medium
⊣ 488 Zuma Game
Hard
⊣ 496 Next Greater Element I
Easy
⊣ 503 Next Greater Element II
Medium
⊣ 581 Shortest Unsorted Continuous Subarray
Medium
⊣ 589 N-ary Tree Preorder Traversal
Easy
⊣ 590 N-ary Tree Postorder Traversal
Easy
⊣ 591 Tag Validator
Hard
⊣ 636 Exclusive Time of Functions
Medium
⊣ 654 Maximum Binary Tree
Medium
⊣ 678 Valid Parenthesis String
Medium
⊣ 682 Baseball Game
Easy
⊣ 726 Number of Atoms
Hard
⊣ 735 Asteroid Collision
Medium
⊣ 736 Parse Lisp Expression
Hard
⊣ 739 Daily Temperatures
Medium
⊣ 768 Max Chunks To Make Sorted II
Hard
⊣ 769 Max Chunks To Make Sorted
Medium
⊣ 770 Basic Calculator IV
Hard
⊣ 844 Backspace String Compare
Easy
⊣ 853 Car Fleet
Medium
⊣ 856 Score of Parentheses
Medium
⊣ 880 Decoded String at Index
Medium
⊣ 895 Maximum Frequency Stack
Hard
⊣ 897 Increasing Order Search Tree
Easy
⊣ 901 Online Stock Span
Medium
⊣ 907 Sum of Subarray Minimums
Medium
⊣ 921 Minimum Add to Make Parentheses Valid
Medium
⊣ 936 Stamping The Sequence
Hard
⊣ 946 Validate Stack Sequences
Medium
⊣ 962 Maximum Width Ramp
Medium
⊣ 975 Odd Even Jump
Hard
⊣ 1003 Check If Word Is Valid After Substitutions
Medium
⊣ 1006 Clumsy Factorial
Medium
⊣ 1008 Construct Binary Search Tree from Preorder Traversal
Medium
⊣ 1019 Next Greater Node In Linked List
Medium
⊣ 1021 Remove Outermost Parentheses
Easy
⊣ 1047 Remove All Adjacent Duplicates In String
Easy
⊣ 1081 Smallest Subsequence of Distinct Characters
Medium
⊣ 1096 Brace Expansion II
Hard
⊣ 1106 Parsing A Boolean Expression
Hard
⊣ 1111 Maximum Nesting Depth of Two Valid Parentheses Strings
Medium
⊣ 1124 Longest Well-Performing Interval
Medium
⊣ 1130 Minimum Cost Tree From Leaf Values
Medium
⊣ 1172 Dinner Plate Stacks
Hard
⊣ 1190 Reverse Substrings Between Each Pair of Parentheses
Medium
⊣ 1209 Remove All Adjacent Duplicates in String II
Medium
⊣ 1249 Minimum Remove to Make Valid Parentheses
Medium
⊣ 1381 Design a Stack With Increment Operation
Medium
⊣ 1441 Build an Array With Stack Operations
Medium
⊣ 1472 Design Browser History
Medium
⊣ 1475 Final Prices With a Special Discount in a Shop
Easy
⊣ 1504 Count Submatrices With All Ones
Medium
⊣ 1526 Minimum Number of Increments on Subarrays to Form a Target Array
Hard
⊣ 1541 Minimum Insertions to Balance a Parentheses String
Medium
⊣ 1544 Make The String Great
Easy
⊣ 1574 Shortest Subarray to be Removed to Make Array Sorted
Medium
⊣ 1598 Crawler Log Folder
Easy
⊣ 1614 Maximum Nesting Depth of the Parentheses
Easy
⊣ 1653 Minimum Deletions to Make String Balanced
Medium
⊣ 1673 Find the Most Competitive Subsequence
Medium
⊣ 1700 Number of Students Unable to Eat Lunch
Easy
⊣ 1717 Maximum Score From Removing Substrings
Medium
⊣ 1776 Car Fleet II
Hard
⊣ 1793 Maximum Score of a Good Subarray
Hard
⊣ 1856 Maximum Subarray Min-Product
Medium
⊣ 1896 Minimum Cost to Change the Final Value of Expression
Hard
⊣ 1910 Remove All Occurrences of a Substring (PRO)
Medium
⊣ 1944 Number of Visible People in a Queue (PRO)
Hard
⊣ 1963 Minimum Number of Swaps to Make the String Balanced (PRO)
Medium
⊣ 1996 The Number of Weak Characters in the Game
Medium
⊣ 2000 Reverse Prefix of Word (PRO)
Easy
⊣ 2019 The Score of Students Solving Math Expression
Hard
⊣ 2030 Smallest K-Length Subsequence With Occurrences of a Letter
Hard
⊣ 2104 Sum of Subarray Ranges
Medium
⊣ 2116 Check if a Parentheses String Can Be Valid
Medium
⊣ 2130 Maximum Twin Sum of a Linked List
Medium
⊣ 2197 Replace Non-Coprime Numbers in Array
Hard
⊣ 2211 Count Collisions on a Road
Medium
⊣ 2216 Minimum Deletions to Make Array Beautiful
Medium
⊣ 2281 Sum of Total Strength of Wizards
Hard
⊣ 2289 Steps to Make Array Non-decreasing
Medium
⊣ 2296 Design a Text Editor
Hard
⊣ 2334 Subarray With Elements Greater Than Varying Threshold
Hard
⊣ 2375 Construct Smallest Number From DI String
Medium
⊣ 2390 Removing Stars From a String
Medium
⊣ 2434 Using a Robot to Print the Lexicographically Smallest String
Medium
⊣ 2454 Next Greater Element IV
Hard
⊣ 2487 Remove Nodes From Linked List
Medium
⊣ 2589 Minimum Time to Complete All Tasks
Hard
⊣ 2617 Minimum Number of Visited Cells in a Grid
Hard
⊣ 2645 Minimum Additions to Make Valid String
Medium
⊣ 2696 Minimum String Length After Removing Substrings
Easy
⊣ 2736 Maximum Sum Queries
Hard
⊣ 2751 Robot Collisions
Hard
⊣ 2813 Maximum Elegance of a K-Length Subsequence
Hard
⊣ 2816 Double a Number Represented as a Linked List
Medium
⊣ 2818 Apply Operations to Maximize Score
Hard
⊣ 2865 Beautiful Towers I
Medium
⊣ 2866 Beautiful Towers II
Medium
⊣ 2940 Find Building Where Alice and Bob Can Meet
Hard
⊣ 2945 Find Maximum Non-decreasing Array Length
Hard
⊣ 3113 Find the Number of Subarrays Where Boundary Elements Are Maximum
Hard
⊣ 3170 Lexicographically Minimum String After Removing Stars
Medium
⊣ 3174 Clear Digits
Easy
⊣ 3229 Minimum Operations to Make Array Equal to Target
Hard
⊣ 3412 Find Mirror Score of a String
Medium
⊣ 3420 Count Non-Decreasing Subarrays After K Operations
Hard
⊣ 3430 Maximum and Minimum Sums of at Most Size K Subarrays
Hard
⊣ 3523 Make Array Non-decreasing
Medium
⊣ 3542 Minimum Operations to Convert All Elements to Zero
Medium
⊣ 3561 Resulting String After Adjacent Removals
Medium
⊣ 3638 Maximum Balanced Shipments
Medium
⊣ 3676 Count Bowl Subarrays
Medium
⊣ 3703 Remove K-Balanced Substrings
Medium
⊣ 3746 Minimum String Length After Balanced Removals (PRO)
Medium
⊣ 3816 Lexicographically Smallest String After Deleting Duplicate Characters
Hard
⊣ 3834 Merge Adjacent Equal Elements
Medium