Facebook | Phone Screen | Trapping Rain Water
Anonymous User
1053

https://leetcode.com/problems/trapping-rain-water/
The number in the array represents the height of columns.
Find the maximum amount of water that can be filled in the entire structure.

Example:
Input: [1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1],
Output: 7
image

Comments (0)