Maximum Width Ramp Leetcode Problems Javascript