LinZhenli

Results 1 issues of LinZhenli

如果index2先到达头部,那说明能插入的值都已经插入了,不用再判断了。 所以优化为: //从尾部开始遍历,先确定尾部 public static void merge2(int[] nums1, int m, int[] nums2, int n) { int index1 = m - 1, index2 = n - 1; int indexMerge = m...

opt