diff --git "a/05_\345\275\222\345\271\266\346\216\222\345\272\217/answer.md" "b/05_\345\275\222\345\271\266\346\216\222\345\272\217/answer.md" index 885d1f63fd09bfe3ab8f0ddf680193e3791c2061..e42fe10c60dcdd9d6dac86772c0193e68a7e4c4a 100644 --- "a/05_\345\275\222\345\271\266\346\216\222\345\272\217/answer.md" +++ "b/05_\345\275\222\345\271\266\346\216\222\345\272\217/answer.md" @@ -6,9 +6,8 @@ package com.yzh; import java.util.Arrays; public class MergeSort { - /** - *把输入序列分成left,right两个子序列,再分别对子序列递归调用归并排序 - */ + + //把输入序列分成left,right两个子序列,再分别对子序列递归调用归并排序 public int[] solution(int[] array) { if (array.length < 2) { return array; @@ -20,9 +19,8 @@ public class MergeSort { return merge(solution(left), solution(right)); } - /** - *将两段排序好的数组结合成一个排序数组 - */ + + //将两段排序好的数组结合成一个排序数组 public int[] merge(int[] left, int[] right) { int[] result = new int[left.length + right.length]; for (int index = 0, i = 0, j = 0; index < result.length; index++) {