Problem Solution Use 2 pointers from left and right ends. Keep updating the maximum height when iterating from both ends. The tapped water depends on the left pointer's height as long as the maximum height on the right so far is greater than the left. Then the water depends on the right pointer's height when maximum height on the left becomes greater. class Solution(object): def trap(self, heigh..