Solved ContainerWithMostWater in java