堆排序,快速排序,歸併排序

☆堆排序:效率高,時間複雜度O(N*log2N),空間複雜度O(1),穩定性:不穩定。 //堆排序 //作用:將下標爲start-end之間的最大值放在start下標位置 public static void adjust(int[] array,int start,int end){ int tmp=array[start]; for(int i=2*start+
相關文章
相關標籤/搜索