( I created the topic, because I did not find any for this puzzle. )
While the puzzle is interesting, I think this sentence in the statement is rather misleading:
As such, the volume of water on the left is the same as on the right (6x "~").
This “6x ~” implies as if the water volume is to be calculated base on the char counts in the grid.
(Because in the provided ascii art example, the real areas of the trapezoids are NOT the same.)
After wasting an hour on a ‘char grid flood’ based solution, and after checking some test cases, now it seems to me that this approach is incorrect and we have to calculate the volumes (or areas in 2D) exactly, and taking into account the slopes as well.
EDIT: the trapezoid areas are indeed the same in the example, my mistake. But the ‘char counting’ approach still seems to be a dead end to me, because only the statement example has 45 degrees slopes, other test cases are more varied…