快速排序(java实现)

import java.util.Arrays;
import java.util.Scanner;

public class quickSort {
    public static void sort(int[] a,int low,int hight){
        int i,j,index;
        if (low>hight){
            return;
        }
        i = low;
        j = hight;
        index = a[i];
        while (i=index){//从右边找比基准值小的,如果没找到则j--;
                j--;
            }
            if (i

 

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