Gainsight interview question

rainwater Trapping priblem