Back to Home

Monotonic Stack

A monotonic stack maintains elements in either strictly increasing or decreasing order. It excels at finding the next greater/smaller element, computing spans, and solving problems involving visibility or dominance relationships in sequences.

6
Problems
1
Easy
3
Medium
2
Hard