Mental Model
We want to find how much water can be trapped between bars of different heights after it rains.
Analogy: Imagine a row of buildings with different heights. Rainwater collects in the dips between taller buildings, like water filling valleys between hills.
Height bars: 3 0 2 0 4
Visual: 4 | ↑
3 | ↑ ↑
2 | ↑ ↑ ↑
1 | ↑ ↑ ↑
0 | ↑ ↑ ↑ ↑ ↑
----------------
0 1 2 3 4 (indices)