Water Connection Problem Leetcode 75