📅  最后修改于: 2022-03-11 14:44:54.524000             🧑  作者: Mango
#include
using namespace std;
int partition(int a[],int low,int high)
{
int pivot =a[high],i=low-1,j=low;
for(j=low;j<=high-1;j++)
{
if(a[high]>=a[j])
{
i++;
swap(a[i],a[j]);
}
}
swap(a[i+1],a[high]);
return i+1;
}
void quicksort(int a[],int low,int high)
{
if(low