LeetCode
Maximum Width Ramp
Click
here
for an explanation.