@@ -0,0 +1,873 @@
+package Sorting;%0A%0Aimport java.util.Arrays;%0A%0A/**%0A * Created by matao on 8/14/16.%0A */%0Apublic class ShellSort extends BaseSort %7B%0A%0A    @Override%0A    public void sort(Comparable%5B%5D a) %7B%0A        int h = 1;%0A        while (h %3C a.length / 3) %7B%0A            h = 3 * h + 1;%0A        %7D%0A        while (h %3E= 1) %7B%0A            for (int i = h; i %3C a.length; i++) %7B%0A                for (int j = i; j %3E= h && lessThan(a%5Bj%5D, a%5Bj - h%5D); j -= h) %7B%0A                    exchange(a, j, j - h);%0A                %7D%0A            %7D%0A            h = h / 3;%0A        %7D%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        ShellSort shellSort = new ShellSort();%0A%0A        Integer%5B%5D a = %7B2, 1, 5, 7, 0, 10%7D;%0A        shellSort.sort(a);%0A        System.out.println(Arrays.toString(a));%0A%0A        Integer%5B%5D b = %7B1, 1, 0, 3, -1%7D;%0A        shellSort.sort(b);%0A        System.out.println(Arrays.toString(b));%0A    %7D%0A%7D%0A

Add shell sort