Java版归并排序

Java版归并排序
/** * author Akalius Kung 2008-2-5 **/ public class MergeSort { public int[] sort(int[] data) {         int[] temp=new int[data.length];         mergeSort(data,temp,0,data.length-1);         return data;     }         private void mergeSort(int[] data,int[] temp,int l,int r){         int mid=(l+r)/2;         System.out.println(l+", "+mid+", "+r);         if(l==r) return ; ...
Copyright © 浩然东方 保留所有权利.   Theme  Ality 07032740

用户登录