Google Interview Question

Maximum Sum Subarray Problem. Trapping Rain Water