Day 5 of LeetCode
Documenting LeetCode solving.
Q1
42. Trapping Rain Water
Hard. Two pointers
How much water the current position i can trap depends on this formula:
water = min(leftMax, rightMax) - height[i].
leftMax: Maximum height on the left.
rightMax: Maximum hei...
evelynsjourney.hashnode.dev1 min read