摘要:
插入排序,某一位置的数与前面已排好序的数从后向前比较,直到找到正确的位置。时间复杂度O(n方) 阅读全文
posted @ 2016-08-13 21:52
鹏徐翔飞11
阅读(124)
评论(0)
推荐(0)
摘要:
1 private static int[] bubbleSort(int[] arr) { 2 int k=arr.length-1,last=0; //最后一次交换的位置,后面已经为排好序状态 3 if (arr==null||arr.length<2) { 4 return arr; 5 } 阅读全文
posted @ 2016-08-13 20:48
鹏徐翔飞11
阅读(131)
评论(0)
推荐(0)

浙公网安备 33010602011771号