摘要: 题目:11. 盛最多水的容器 采用双指针法: 两端向中间移动,每次移动短板,计算此时的容量,和res进行比较,最后留下最大的即可。 class Solution { public int maxArea(int[] height) { int n=height.length; int i=0; in 阅读全文
posted @ 2023-02-18 16:45 ZLey 阅读(19) 评论(0) 推荐(0) 编辑