摘要:
只在快拍的基础上改了一点点 与快速排序算法不同的是,我们关注的并不是元素的左右两边,而仅仅是某一边#includeusing namespace std;int a[100];int p(int left,int right){ int t,temp=a[left]; while(left=temp) right--; } return left;}int pai(int low,int high,int m){ int u; u=p(low,high); if(u==m) return a[u]; else ... 阅读全文