Given `height`, an array of non-negative bar heights each 1 unit wide, implement `trap(height)` returning how many units of water are trapped after raining.
+ 2 hidden tests run on Submit.
Move two pointers inward from both ends. The side with the smaller current height is the limiting wall, so the water over that bar equals its running max minus its own height. This computes the answer in one O(n) pass with O(1) space.
Run your code to see results.