public static void sort(Comparable[] a, int lo, int hi) { 
        if (hi <= lo) return;
        int j = partition(a, lo, hi);
        for (Comparable a1 : a) {
            System.out.print(a1);
            System.out.print(' ');
        }
        System.out.println();
        sort(a, lo, j-1);
        sort(a, j+1, hi);
    }