Monotonic stack [mp]
Micro pattern¶
Description¶
Keep unresolved values ordered and pop them when new input determines their final contribution.
Problems¶
- 84. Largest Rectangle in Histogram (Top Hard)
Keep unresolved values ordered and pop them when new input determines their final contribution.