https://medium.com/@tejeswar_79802/leetcode-challenge-42-trapping-rain-water-javascript-solution-c255fc8802a8