快排java

package leetcode;

public class quikSort {
    public static int[] quickSort(int[] list1,int left,int right){
        if(left>right){
            return null;
        }
        int i = left;
        int j = right;
        int pivot=list1[left];
        while (ilist1[i] && i

结果:

5-9-10-13-14-18-
Process finished with exit code 0

不理解的可以看看:https://blog.csdn.net/morewindows/article/details/6684558

时间复杂度:nlogn

快排java_第1张图片

 

你可能感兴趣的:(leetcode)