The bottom-up sorting method is much faster than the Bubble sorting method. The basic idea is: first, arrange the order of two groups, one group, and the other four groups ....... 8 ........ there is a problem until all rows are completed. During the intermediate transition, a temporary array is required to save the data. In fact, each segment is a variant of the insert sort method. The Code is as follows: [csharp] private int [] sortedData; public int [] Sort (int [] data) {sortedData = new int [data. length]; int t = 1; while (t <data. length) {int dt = t * 2; int I = 0; while (I + dt <= data. length) {merge (data, I, I + t, I + dt-1); I = I + dt;} if (I + t <data. length) {merge (data, I, I + t, data. length-1);} t = t * 2;} return sortedData;} private void merge (int [] data, int index1, int index2, int end) {int j = index1; int k = index2; int I = index1; while (j <index2 & k <= end) {if (data [j] <data [k]) {sortedData [I] = data [j]; j ++; I ++ ;} else {sortedData [I] = data [k]; k ++; I ++ ;}} if (j = index2) {while (k <= end) {sortedData [I] = data [k]; k ++; I ++ ;}} else {while (j <index2) {sortedData [I] = data [j]; j ++; I ++ ;}} I = index1; for (; I <= end; I ++) {data [I] = sortedData [I] ;}}