public class ShellSort implements IArraySort {
public int[] sort(int[] sourceArray) throws Exception {
int[] arr = Arrays.copyOf(sourceArray, sourceArray.length);
while (gap < arr.length/3) {
for (int i = gap; i < arr.length; i++) {
while (j >= 0 && arr[j] > tmp) {
gap = (int) Math.floor(gap / 3);