java合并排序

package com.alo.offer;
/**
 * 合并排序
 * @author Administrator
 *
 */
public class MergeSort {
	public static void main(String[] args) {
		int []a ={564,378,954,1255,684,57,15,389,687,45,98,125,348};
		new MergeSort().MergeSort(a,0,a.length-1);
		for(int i:a) {
			System.out.print(i+" ");
		}
	}
	public void MergeSort(int []a,int low,int high) {
		int mid=0;
		while(low

你可能感兴趣的:(算法)