@@ -0,0 +1,1260 @@
+package main.algorithm.quicksort;%0A%0A/**%0A * Title : main.algorithm.quicksort %3Cbr%3E%0A * Description :%0A *  %3Cp%3E%0A *  %3Cul%3E %0A *      %3Cli%3E%0A *  %3C/ul%3E%0A * @author chile%0A * @version 1.0%0A * @date 2018/4/10 11:11%0A */%0Apublic class QuickSort %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        int%5B%5D nums = %7B2, 6, 13, 7, 12, 3%7D;%0A        out(nums);%0A        quickSort(nums, 0, nums.length - 1);%0A        out(nums);%0A    %7D%0A%0A    private static void out(int%5B%5D nums) %7B%0A        for (int num : nums) %7B%0A            System.out.print(num);%0A            System.out.print(%22 %22);%0A        %7D%0A        System.out.println();%0A    %7D%0A%0A    private static void quickSort(int%5B%5D nums, int head, int tail) %7B%0A        if (nums == null %7C%7C nums.length %3C= 1 %7C%7C head %3E= tail) %7B%0A            return;%0A        %7D%0A%0A        int i = head, j = tail, pivot = nums%5B(i + j) / 2%5D;%0A        while (i %3C j) %7B%0A            while (nums%5Bi%5D %3C pivot) %7B%0A                i++;%0A            %7D%0A            while (nums%5Bj%5D %3E pivot) %7B%0A                j--;%0A            %7D%0A            if (i %3C j) %7B%0A                int t = nums%5Bi%5D;%0A                nums%5Bi%5D = nums%5Bj%5D;%0A                nums%5Bj%5D = t;%0A                i++;%0A                j--;%0A            %7D%0A        %7D%0A        quickSort(nums, head, i - 1);%0A        quickSort(nums, i + 1 , tail);%0A    %7D%0A%0A%7D%0A

quick sort