Maximum Width Ramp
Find the widest pair of positions where the earlier value is no greater than the later value. The visual uses a monotonic stack and a sweep from the right.
Find the widest pair of positions where the earlier value is no greater than the later value. The visual uses a monotonic stack and a sweep from the right.