Given n non-negative integers representing an elevation map where each bar has width 1, compute how much water it can trap after raining.
Input: one line of space-separated integers height.
Output: total units of trapped water.
0 1 0 2 1 0 1 3 2 1 2 1
6
4 2 0 3 2 5
9
Run your code against the sample tests, or Submit to run the full suite.