insertionSort(A, n, g)
for i = g to n-1
 v = A[i]
 j = i - g
while j >= 0 && A[j] > v
 A[j+g] = A[j]
 j = j - g
cnt++
A[j+g] = v

shellSort(A, n)
 cnt = 0
 m = 1
G[] = {?, ?,..., ?}
for i = 0 to m-1
 insertionSort(A, n, G[i])