摘要:
暴力题解 时间复杂度O(n^3),超时 代码 public int findLength(int[] A, int[] B) { int max=0; int l1=A.length,l2=B.length; for(int i=0;i<l1;i++){ int tmp=0; for(int j=0 阅读全文
摘要:
暴力题解 思路 确定两端值 a c,找出符合要求的中间值 b 代码 //超时 public static List<List<Integer>> threeSum(int[] nums) { List<List<Integer>> lists = new ArrayList<>(); if (num 阅读全文
摘要:
暴力 代码 //1100ms public int[] dailyTemperatures(int[] T) { if (T == null || T.length == 0) return new int[0]; int[] ans = new int[T.length]; for (int i 阅读全文