[leetcode-42] Trapping Rain Water
ยท
๐ข One step
LeetCode-42 Trapping Rain Water : Trapping rain water. find volume note : Tip: swapAnswer :::python class Solution: def trap(self, height: List[int]) -> int: if not height: return 0 volume = 0 left, right = 0, len(height) - 1 left_max, right_max = height[left], height[right] while left