LeetCode 42. Trapping Rain Water
Last updated
Was this helpful?
Last updated
Was this helpful?
Given n
non-negative integers representing an elevation map where the width of each bar is 1
, compute how much water it can trap after raining.
Example 1:
Example 2:
Constraints:
n == height.length
0 <= n <= 3 * 10^4
0 <= height[i] <= 10^5