Concept Flow - Trapping Rain Water Problem
Start with height array
Find max height to left for each bar
Find max height to right for each bar
Calculate water trapped at each bar: min(left_max, right_max) - height
Sum all trapped water
Return total trapped water
The flow shows how for each bar, we find the tallest bar on the left and right, then calculate trapped water by the difference between the smaller max and current height.
