Skip to content

Monotonic Stack Problems

Practice Monotonic Stack coding problems with detailed solutions and an in-browser JavaScript runner. Each problem includes examples, constraints, and a working code editor.

9 problems

Title Difficulty
Largest Rectangle in Histogram Hard
Maximal Rectangle Hard
Maximum of Window Minimums Hard
Largest All-Ones Rectangle Medium
Minimum Cost Tree From Leaf Values Medium
Next Greater Element I Easy
Online Stock Span Medium
Sum of Subarray Minimums Medium
Trapping Rain Water Hard