摘要:
15. 三数之和 class Solution { public List<List<Integer>> threeSum(int[] nums) { Arrays.sort(nums); List<List<Integer>> res = new ArrayList<>(); for(int k 阅读全文
摘要:
11. 盛最多水的容器 双指针,移动短板,更新结果 class Solution { public int maxArea(int[] height) { int i = 0, j = height.length - 1, res = 0; while(i < j) { res = height[i 阅读全文
摘要:
4. 寻找两个正序数组的中位数 1 class Solution { 2 public double findMedianSortedArrays(int[] nums1, int[] nums2) { 3 int n = nums1.length; 4 int m = nums2.length; 阅读全文