Trapping The Rain Water Leetcode Javascript