quicksort.h
来自「有各种排序算法」· C头文件 代码 · 共 17 行
H
17 行
#ifndef QUICKSORT_H
#define QUICKSORT_H
#include"DataList.h"
template<class T>
void QuickSort(dataList<T>& L,const int left,const int right)
{
if(left < right)
{
int pivotpos = L.Partition2(left,right);
cout << L << endl;
QuickSort(L,left,pivotpos-1);
QuickSort(L,pivotpos+1,right);
//cout << L << endl;
}
}
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?