Create Trapping Rain Water

Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6.