Amazon interview question

Leetcode hard trapping rain water question.