【正确答案】正确答案:快速排序的非递归算法的核心语句段如下: typedef struct{int low,high;)node node s[n+1]; int quickpass(rectype r[],int,int); //函数声明 int top=1;s[top].low=1; s[top].high=n;; //top是栈顶指针 while(top>0) (ss=s[top].low;tt=s[top].high;top一一; if(ssI){s[++top].low=SSj s[top].high=k一1;} //枢轴左边进栈 if(tt—k>1){s[++top].low=k+1; s[top].high=tt ;} //枢轴右边进栈 } }
【答案解析】