@@ -0,0 +1,1700 @@
+//https://www.hackerrank.com/challenges/quicksort3%0Aimport java.io.*;%0A%0Apublic class Solution %7B%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        %0A        //Get input%0A        final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));%0A        final short N = Short.parseShort(br.readLine());%0A        final short%5B%5D A = toShortArray(br.readLine().split(%22 %22));%0A        %0A        //Solve and print output%0A        quickSort(A, 0, N);%0A    %7D%0A    %0A    //Quicksort%0A    %0A    private static void quickSort(final short%5B%5D A, final int min, final int max)%7B%0A        if(max - min %3E 1)%7B%0A            final int mid = partition(A, min, max);%0A            printArray(A);%0A            quickSort(A, min, mid);%0A            quickSort(A, mid + 1, max);%0A        %7D%0A    %7D%0A    %0A    private static int partition(final short%5B%5D A, final int min, int max)%7B%0A        int pivotI = min;%0A        final short pivotV = A%5B--max%5D;%0A        for(int i = min; i %3C max; ++i)%7B%0A            if(A%5Bi%5D %3C= pivotV)%7B%0A                final short t = A%5Bi%5D;%0A                A%5Bi%5D = A%5BpivotI%5D;%0A                A%5BpivotI++%5D = t;%0A            %7D%0A        %7D%0A        A%5Bmax%5D = A%5BpivotI%5D;%0A        A%5BpivotI%5D = pivotV;%0A        return pivotI;%0A    %7D%0A    %0A    //HELPERS%0A    %0A    private static short%5B%5D toShortArray(final String%5B%5D A)%7B%0A        final int N = A.length;%0A        final short%5B%5D B = new short%5BN%5D;%0A        for(int i = 0; i %3C N; ++i)%7B%0A            B%5Bi%5D = Short.parseShort(A%5Bi%5D);%0A        %7D%0A        return B;%0A    %7D%0A    %0A    private static void printArray(final short%5B%5D A)%7B%0A        final StringBuffer sb = new StringBuffer();%0A        for(int i = 0, n = A.length; i %3C n; sb.append(A%5Bi++%5D + %22 %22))%7B%7D%0A        System.out.println(sb);%0A    %7D%0A%7D%0A

Create quicksort3.java