摘要: public class ShellSort { public static void print(int[] arr) { for (int i : arr) { System.out.print(i + " "); } System.out.println(); } public static 阅读全文
posted @ 2017-04-07 21:55 RainbowFrost 阅读(278) 评论(0) 推荐(0) 编辑
摘要: public class BubbleSort{ public static void sort(int[] arr) { int temp; boolean flag = true;//排序的优化,当循环不在赋值时就会停止循环 for (int i = 0; i < arr.length -1 & 阅读全文
posted @ 2017-04-07 21:22 RainbowFrost 阅读(264) 评论(0) 推荐(0) 编辑