随笔分类 - 排序
摘要:1 public class Test { 2 public static void main(String[] args) { 3 int[] arr = {5, 2, 6, 8, 9, 1}; 4 if (arr == null || arr.length = 0 && arr[j] > arr[j + 1]; j--) { 10 ...
阅读全文
摘要:1 public class Test { 2 public static void main(String[] args) { 3 int[] arr = {5, 2, 6, 8, 9, 1}; 4 if (arr == null || arr.length <= 2) { 5 return; 6 } 7 for (int i = 0; i < arr.length - 1; i++) { 8
阅读全文
摘要:1 public class Test { 2 public static void main(String[] args) { 3 int[] arr = {5, 2, 6, 8, 9, 1}; 4 if (arr == null || arr.length <= 2) { 5 return; 6 } 7 for (int end = arr.length - 1; end > 0; end--
阅读全文

浙公网安备 33010602011771号