ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
> 自底向上的归并排序适用于链表组织的数据 ```java public static <T extends Comparable> void mergeSort2(T[] a) { int N = a.length; mergeAux = new Comparable[a.length]; for (int i = 1; i < N; i = i + i) { for (int low = 0; low < N - i; low += i + i) { merge(a, low, low + i - 1, Math.min(low + i + i - 1, N - 1)); } } } ```