摘要:
#include<iostream>#include<algorithm>using namespace std;int partition(int* &a,int p,int r){ int x=a[r]; int i=p-1; for(int j=p;p<=r-1;p++) { if(a[j]<=x) { i=i+1; swap(a[i],a[j]); } } swap(a[i+1],a[r]); return i+1;}void quicksort(int* &... 阅读全文