give n nonnegative integer represent elevation map width bar 1 compute water trap rain Example 1input height 010210132121output 6explanation the elevation map black section represent array 010210132121 in case 6 unit rain water blue section trappedexample 2input height 420325output 9 Constraintsn heightlength1 n 2 1040 heighti 105