Problems / Two Pointers / Trapping Rain Water
#14 Hard Time O(n) Space O(1) Animated

Trapping Rain Water

Compute how much water it is able to trap after raining.

LeetCode ↗
Approach: Two Pointers
Click play to start
Step 0 / 0
Press play to start the visualization.

Steps