ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
```java public static <T extends Comparable> void mergeSort(T[] a) { mergeAux = new Comparable[a.length]; mergeSort(a, 0, a.length - 1); } public static <T extends Comparable> void mergeSort(T[] a, int low, int high) { if (high <= low) { return; } int middle = low + (high - low) / 2; mergeSort(a, low, middle); mergeSort(a, middle + 1, high); merge(a, low, middle, high); } ```