摘要:
public class ShellSort { public static void print(int[] arr) { for (int i : arr) { System.out.print(i + " "); } System.out.println(); } public static 阅读全文
摘要:
public class BubbleSort{ public static void sort(int[] arr) { int temp; boolean flag = true;//排序的优化,当循环不在赋值时就会停止循环 for (int i = 0; i < arr.length -1 & 阅读全文