摘要:
一 插入排序 时间复杂度 O(n^2) 空间复杂度O(1) 稳定性:稳定 //插入排序 public static void inSort(int[] arr){ for (int i = 0; i < arr.length; i++) { int tmp=arr[i]; int j = i+1; 阅读全文
摘要:
一 堆 分为大根堆和小根堆 child=2*parent+1 parent=(child-1)/2 创建大根堆 public int[]elem; public int usedsize; public TestHeap(){ int[] elem=new int[10]; } public voi 阅读全文