Each non-negative value in height is a unit-width elevation bar. Return the total water units retained after rain.
Input / output
height: integer[]Examples
[0,1,0,2,1,0,1,3,2,1,2,1] returns 6.[4,2,0,3,2,5] returns 9.Constraints
0 <= height.length <= 100,0000 <= height[i] <= 100,000Follow-up Derive the two-pointer rule from the smaller of the left and right maxima.