#include<iostream>
#include "stdafx.h"
#include <iostream>
#include <ctime>
#include <stack>
using namespace std;
int PartSort(int* pArray, int nLeft, int nRight)
{
int nKey = pArray[nLeft];
while (nLeft < nRight)
{
while (pArray[nRight] >= nKey && nRight > nLeft)
{
nRight--;
}
pArray[nLeft] = pArray[nRight];
while (pArray[nLeft] < nKey && nLeft < nRight)
{
nLeft++;
}
pArray[nRight]
C++快速排序的递归和非递归实现
最新推荐文章于 2022-12-05 22:54:59 发布