rewrite leetcode trapping rain water