if remaining capacity of tatal water is not equal to zero then we add left and right glass of the next row and gives half capacity of tatal water to both the glass
if ( curr . rem_water != 0 ) { queue . push ( new Triplet ( curr . row + 1 , curr . col - 1 , ( curr . rem_water / 2 ) ) ) ; queue . push ( new Triplet ( curr . row + 1 , curr . col + 1 , ( curr . rem_water / 2 ) ) ) ; } }