Update TrappingRainWater.cpp

O(n) time O(1) space