// Shellsort for a table of integers #include #include void shellsort(int *a,int n) { int group; int i,j,h,hWork; int v; for (h=1; (hWork=3*h+1)0;h/=3) { for (group=0; group=h && a[j-h]>v) { a[j]=a[j-h]; j -= h; } a[j]=v; } printf("after h=%d\n",h); for (i=0;i