摘要:
算法思想:算法将数组分为两个子数组,然后对每个子数组递归应用归并排序。package introjava;public class MergeSort { public static void mergeSort(int [] list){ if(list.length > 1){ //这是递归跳出的条件,一定要记住!!! int firstHalfLen = list.length / 2; int [] firstHalf = new int[firstHalfLen]; System.arraycopy(list, 0, firstHalf, 0, ... 阅读全文
posted @ 2014-03-12 09:05
hansonzhe
阅读(151)
评论(0)
推荐(0)

浙公网安备 33010602011771号