← back

Monotonic Stack

57 questions · 0 seen

All Monotonic Stack problems

Problems

42 Trapping Rain Water
84 Largest Rectangle in Histogram
85 Maximal Rectangle
316 Remove Duplicate Letters
321 Create Maximum Number
402 Remove K Digits
456 132 Pattern
496 Next Greater Element I
503 Next Greater Element II
581 Shortest Unsorted Continuous Subarray
654 Maximum Binary Tree
739 Daily Temperatures
768 Max Chunks To Make Sorted II
769 Max Chunks To Make Sorted
853 Car Fleet
901 Online Stock Span
907 Sum of Subarray Minimums
962 Maximum Width Ramp
975 Odd Even Jump
1008 Construct Binary Search Tree from Preorder Traversal
1019 Next Greater Node In Linked List
1081 Smallest Subsequence of Distinct Characters
1124 Longest Well-Performing Interval
1130 Minimum Cost Tree From Leaf Values
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
1574 Shortest Subarray to be Removed to Make Array Sorted
1673 Find the Most Competitive Subsequence
1776 Car Fleet II
1793 Maximum Score of a Good Subarray
1856 Maximum Subarray Min-Product
1944 Number of Visible People in a Queue (PRO)
1996 The Number of Weak Characters in the Game
2030 Smallest K-Length Subsequence With Occurrences of a Letter
2104 Sum of Subarray Ranges
2281 Sum of Total Strength of Wizards
2289 Steps to Make Array Non-decreasing
2334 Subarray With Elements Greater Than Varying Threshold
2454 Next Greater Element IV
2487 Remove Nodes From Linked List
2617 Minimum Number of Visited Cells in a Grid
2736 Maximum Sum Queries
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
3229 Minimum Operations to Make Array Equal to Target
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
3638 Maximum Balanced Shipments
3676 Count Bowl Subarrays
3816 Lexicographically Smallest String After Deleting Duplicate Characters