Maximum Width Ramp Leetcode Problems Java