void quicksort(string[] pdata,int[] pdatanum,int left,int right)
{
int i,j;
int itemp;
string middle,strtemp;
i = left;
j = right;
middle = pdata[(left+right)/2];
do{
while((pdata[i].compareto(middle)<0) && (i
i++;
while((pdata[j].compareto(middle))>0 && (j>left))
j–;
if(i<=j)
{
strtemp = pdata[i];
pdata[i] = pdata[j];
pdata[j] = strtemp;
itemp = pdatanum[i];
pdatanum[i] = pdatanum[j];
pdatanum[j] = itemp;
i++;
j–;
}
}while(i<=j);//如果两边扫描的下标交错,就停止(完成一次)
if(left
quicksort(pdata,pdatanum,left,j);
if(right>i)
quicksort(pdata,pdatanum,i,right);
}