#include<iostream>
using namespace std;
void swapM(int &a, int &b)
{
int tmp = a;
a = b;
b = tmp;
}
//用治处理 O(n+mlog(m))
//用O(n)把m大个数挪到右边,然后对这m个数排序再输出
void QuickSort(int a[], int s, int e)
{
if(s >= e)
return;
int k = a[s];
int i = s, j = e;
输出前m大个数,时间复杂度O(n+mlog(m))
最新推荐文章于 2022-07-28 08:00:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)