public class BubbleSort {
public static void sort(int[] numbers) {
int len = numbers.length;
for (int i=0; i
numbers[j+1]) {
int tmp = numbers[j];
numbers[j] = numbers[j+1];
numbers[j+1] = tmp;
}
}
}
}
public static void main(String[] args) {
int[] test= {73,22,93,43,55,14,28,65,39,81,33,100};
sort(test);
for(int i=0;i
Sorting -- BubbleSort
最新推荐文章于 2020-01-11 11:46:14 发布