Water Container Problem Leetcode