waterTrapped problem

https://oj.leetcode.com/problems/trapping-rain-water/