Week 3 · Day 16 of 42

Stack: Monotonic Stack

Maintain a stack in increasing (or decreasing) order.

Checking access

Spotted a mistake on this page?

Wrong formula, broken animation or confusing wording. Tell us and we will fix it.