Md-Azmir
Results
2
comments of
Md-Azmir
**Approach** To keep water, we have to have a bar on the left side and on the right side. Between them, we can keep water. Let's think about this example....
### //Solution class Solution { public int trap(int[] height) { int left = 0, right = height.length - 1; int leftMax = height[0], rightMax = height[height.length - 1]; int water...