摘要: 代码 public static void quickSort(int[] arr,int left,int right){ int l = left; int r = right; //pivot 中轴值 int pivot = arr[(left + right) / 2]; int temp 阅读全文
posted @ 2021-09-15 16:49 卡卡罗特琪琪 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 交换式 代码 protected static void shellSort1(int[] arr) { int temp = 0; for(int gap = arr.length / 2;gap > 0; gap /= 2){ for(int i = gap;i < arr.length; i 阅读全文
posted @ 2021-09-15 10:53 卡卡罗特琪琪 阅读(89) 评论(0) 推荐(0) 编辑