leetcode題解(六):11.Container With Most Water

Example: Input: [1,8,6,2,5,4,8,3,7] Output: 49 public class Solution { public int maxArea(int[] height) { //兩根指針 int maxarea = 0, l = 0, r = height.length - 1; while (l < r) {
相關文章
相關標籤/搜索