一、归并排序1、算法思想将数组分成两半,先对每一半分别排序,然后把有序的两半归并(merge)为一个有序的数组。如:【38,16,27,39,12,27】2、算法代码package排序算法;importjava.util.Arrays;归并排序authorxcbeyonddate2012621上午11:33:15publicclassmergeSort{publicstaticvoidmain(String[]args){inta[]{13,15,37,89,60,39,12,109,56,72};mergeSort(a,0,a.length1);System.out.println(Arrays.toString(a));}归并排序par...
2020-10-04 09:57:10 8902浏览 0点赞 0回复 0收藏