实现希尔和快速排序
} } } } temp=R[j]; R[j]=R[j+d]; R[j+d]=temp; j=j-d; printf(" d=%d: ",d); for(k=0;k<n;k++) printf("%3d",R[k].key); printf("\n"); d=d/2;
void QuickSort(RecType R[],int s,int t)
{
int i=s,j=t,k; RecType temp; if(s<t) { temp=R[s]; while(i!=j) { } R[i]=temp; printf(" "); for(k=0;k<10;k++) if(k==i) printf("[%d]",R[k].key); else while(j>i&&R[j].key>temp.key) { } while(i<j&&R[i].key<temp.key) { } R[j]=R[i]; j--; i++; if(i<j) R[i]=R[j]; i++; j--; if(i<j)