you give integer array height length n there n vertical line draw endpoint ith line 0 heightifind line xaxis form container container contain waterreturn maximum water container storenotice slant container Example 1input height 186254837output 49explanation the vertical line represent array 186254837 in case max area water blue section container contain 49example 2input height 11output 1 Constraintsn heightlength2 n 1050 heighti 104