Amazon interview question

leetcode problem trapping rain water