排序算法 - 快速排序

排序算法是对冒泡排序的改进,基于分治(divide and conquer)思想。

package com.anderson.sort;

public class QuickSort{

    public static void main(String []args){

       int[] a = {10,23,5,16,15,1,30,45,23,9};
       int start = 0;
       int end = a.length-1;
       sort(a,start,end);
       for(int i = 0; i<a.length; i++){
            System.out.println(a[i]);
        }
       
    }
}

  

posted @ 2017-11-08 23:01  cuiyijing  阅读(130)  评论(0编辑  收藏  举报