update Trapping_Rain_Water using O(2n); aim is to make it O(n)