Goldman Sachs interview question

Trapping Rain Water LC problem