Answer to some Euler problems
Algorithm to calculate the amount of water held by a randomly generated structure. As an example, this structure
_
9 | |
8 | | _
7 | || | ___
6 | | |
5 | | | |
4 | |__| |
3 | |
2 | |
1 |0 1 2 3 4 5 6|
Would hold 4 blocks of water.