快速排序

快速排序中最关键的步骤就是划分操作,今天我用的是用数组第一个元素作为轴。

#include 
#include 
using namespace std;

int quicksort_pritition(int a[],int low,int high)
{
    int pivot=a[low];
    while(low=pivot) --high;
        a[low]=a[high];
        while(low

 

你可能感兴趣的:(大学数据结构算法集,快速排序)