modify ContainerWithMostWater.cpp, O(n^2)->O(n)