public int[] sort(int[] arr) {
		int dt = arr.length;
		while (true) {
			dt = dt / 2;
			for (int m=0; m<dt; m++) {
				int temp = 0, j = 0;
				for (int i=m+dt; i<arr.length; i=i+dt) {
					temp = arr[i];
					stepCount++;
					for (j=i-dt; j>=0 && arr[j]>temp; j=j-dt) {
						arr[j+dt] = arr[j];
						if (printable) print(" shell " + m + ", " + dt + "", arr, j, j+dt, stepCount);
					}
					if (j+dt != i) {
						arr[j+dt] = temp;
						if (printable) print(" temp " + m + ", " + dt + "", arr, i, j+dt, stepCount);
					}
				}
			}
			
			if (dt == 1) break;
		}
		
		return arr;
	}