DrawCode
Monotonic Stack
Stack keeping elements monotonic (incr/decr) to solve nearest greater, largest rectangle in histogram.
Browse free without an account. Sign in to save progress, sync likes, and open your canvas workspace.
DrawCode
Stack keeping elements monotonic (incr/decr) to solve nearest greater, largest rectangle in histogram.
Browse free without an account. Sign in to save progress, sync likes, and open your canvas workspace.