摘要: 1 public class InsertionSort { 2 3 public static void main(String[] args) { 4 //随机生成5个0到100之间的数 5 int [] arr = new int[5]; 6 for(int i = 0; i 0 && arr[j - 1] > arr... 阅读全文
posted @ 2019-02-11 04:06 resuscitate 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 1 public class BubbleSort { 2 public static void main(String[] args) { 3 //随机生成5个0到100之间的整数 4 int[] arr = new int[5]; 5 for(int i=0; i arr[j+1]){ 16 ... 阅读全文
posted @ 2019-02-11 03:32 resuscitate 阅读(303) 评论(1) 推荐(0) 编辑