Amazon interview question

One was trapping rain water leetcode(medium)