Trapping Rain Water
Given an array of 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. For example, given [0,1,0,2,1,0,1,3,2,1,2,1], the output should be 6. Constraints: 1 \le n \le 2 \times 10^4 0 \le height[i] \le 10^5
JavaTwo Pointers
00