Intel Corporation interview question

solve the Trapping Rain Water problem from Leetcode