stores how much amount of water present in every glass
let dp = new Array ( i + 1 ) ; for ( let k = 0 ; k < dp . length ; k ++ ) { dp [ k ] = new Array ( ( 2 * i ) + 1 ) ; for ( let l = 0 ; l < dp [ k ] . length ; l ++ ) { dp [ k ] [ l ] = 0 ; } }