leetcode container with most water O(nlogn) solution