=\}
void BeforeSort()//ʼ { p=0;q=0; }
void quicksort(sqlist r,int s,int t) {
int i=s,j=t; if(s r[0]=r[s];p++; while(i while(i p++; while(i r[j]=r[i];q++;p++; } r[i]=r[0];p++; } else return; quicksort(r,s,j-1); quicksort(r,j+1,t); } void sort(sqlist r,int s,int t) { BeforeSort(); quicksort(r,s,t); display(p,q); } //2-· void sort3(sqlist nu,int n) {//int max=n; #define max 20 int first,final;//ͷβָ int cache[max+1];//תվ int i,j,s=0;//i,jѭ k int t=0; for(i=0;i if(0==i) { first=0; final=0; cache[0]=nu[0].key; } else { if(nu[i].key>=cache[final]) {t++; final++; cache[final]=nu[i].key; s++; } else if(nu[i].key<=cache[first])