LeetCode 84. Largest Rectangle in Histogram | Monotonic Stack Part 4 | Stack | Array

preview_player
Показать описание
A monotonic stack is a stack whose elements are monotonically increasing or decreasing. It contains all qualities that a typical stack has and its elements are all monotonic decreasing or increasing. Sometimes we store the index of the elements in the stack and make sure the elements corresponding to those indexes in the stack forms a mono-sequence. We will use a monotonic stack to solve this problem.

Part 4. LeetCode 84. Largest Rectangle in Histogram

# Monotonic Stack

## Part 1. Nearest Smaller Elements

## Part 2. LeetCode 1475. Final Prices With a Special Discount in a Shop

## Part 3. LeetCode 739. Daily Temperatures

## Part 4. LeetCode 84. Largest Rectangle in Histogram
Рекомендации по теме
Комментарии
Автор

This is easily the best solution I've ever found to this problem, very clearly explained - thank you!

philipthomas
join shbcf.ru