public class BucketSort {
public static void sort(int[] numbers, int d) { // d is the largest number of digit
int k = 0, n = 1;
int m = 1;
int[][] tmp = new int[10][numbers.length]; // store the numbers in each bucket
int[] order = new int[10]; // count the total number of numbers in current bucket
while (m <= d) {
for (int i=0; i
07-12
07-12
07-12
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交