Google interview question

Maximum Sum Subarray Problem. Trapping Rain Water