LeetCode 42. Trapping Rain Water Java Solution
Problem
Trapping Rain Water - LeetCode
Problem-solving approach
At least three elements (1, 0, 1) are required to hold water, so we need a minimum of three elements.
Algorithm
We find the highest blocks on the left and right sides with respect ...
eunhanlee.hashnode.dev3 min read