← back

Stack

146 questions · 0 seen

All Stack problems

Problems

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