11 2021 档案

摘要:15. 三数之和 class Solution { public List<List<Integer>> threeSum(int[] nums) { Arrays.sort(nums); List<List<Integer>> res = new ArrayList<>(); for(int k 阅读全文
posted @ 2021-11-11 22:49 星予 阅读(28) 评论(0) 推荐(0)
摘要:11. 盛最多水的容器 双指针,移动短板,更新结果 class Solution { public int maxArea(int[] height) { int i = 0, j = height.length - 1, res = 0; while(i < j) { res = height[i 阅读全文
posted @ 2021-11-03 09:51 星予 阅读(35) 评论(0) 推荐(0)