Trapping Rain Water: using stack to store peaks