Input is a matrix representing the height of each position. Output is amount of water that can be trapped in this matrix.
Trap rain water 2dimensional


@pushazhiniao I repeat using the dfs to pour the water into the lowlands and update the new height matrix until the height matrix cannot change (5min30s for the large set based on Python). Someone said you can also use Dijkstra to solve it.