Monotonic Stack Problems
54 Monotonic Stack LeetCode problems · Solve with AI-powered hints & step-by-step explanations.
Learn the coding interview patterns behind these problems.
Start with these
All Monotonic Stack problems
42 Trapping Rain Water Hard84 Largest Rectangle in Histogram Hard85 Maximal Rectangle Hard316 Remove Duplicate Letters Medium321 Create Maximum Number Hard402 Remove K Digits Medium456 132 Pattern Medium496 Next Greater Element I Easy503 Next Greater Element II Medium581 Shortest Unsorted Continuous Subarray Medium654 Maximum Binary Tree Medium739 Daily Temperatures Medium768 Max Chunks To Make Sorted II Hard769 Max Chunks To Make Sorted Medium853 Car Fleet Medium901 Online Stock Span Medium907 Sum of Subarray Minimums Medium962 Maximum Width Ramp Medium975 Odd Even Jump Hard1008 Construct Binary Search Tree from Preorder Traversal Medium1019 Next Greater Node In Linked List Medium1081 Smallest Subsequence of Distinct Characters Medium1124 Longest Well-Performing Interval Medium1130 Minimum Cost Tree From Leaf Values Medium1475 Final Prices With a Special Discount in a Shop Easy1504 Count Submatrices With All Ones Medium1526 Minimum Number of Increments on Subarrays to Form a Target Array Hard1574 Shortest Subarray to be Removed to Make Array Sorted Medium1673 Find the Most Competitive Subsequence Medium1776 Car Fleet II Hard1793 Maximum Score of a Good Subarray Hard1856 Maximum Subarray Min-Product Medium1944 Number of Visible People in a Queue Hard1996 The Number of Weak Characters in the Game Medium2030 Smallest K-Length Subsequence With Occurrences of a Letter Hard2104 Sum of Subarray Ranges Medium2281 Sum of Total Strength of Wizards Hard2289 Steps to Make Array Non-decreasing Medium2334 Subarray With Elements Greater Than Varying Threshold Hard2454 Next Greater Element IV Hard2487 Remove Nodes From Linked List Medium2617 Minimum Number of Visited Cells in a Grid Hard2736 Maximum Sum Queries Hard2818 Apply Operations to Maximize Score Hard2865 Beautiful Towers I Medium2866 Beautiful Towers II Medium2940 Find Building Where Alice and Bob Can Meet Hard2945 Find Maximum Non-decreasing Array Length Hard3113 Find the Number of Subarrays Where Boundary Elements Are Maximum Hard3229 Minimum Operations to Make Array Equal to Target Hard3420 Count Non-Decreasing Subarrays After K Operations Hard3430 Maximum and Minimum Sums of at Most Size K Subarrays Hard3523 Make Array Non-decreasing Medium3542 Minimum Operations to Convert All Elements to Zero Medium