📄 test.cpp
字号:
#include"DataList.h"
#include"BinaryInsertSort.h"
#include"BubbleSort.h"
#include"QuickSort.h"
#include"QuickSort_insert.h"
#include"ShellSort.h"
#include"SelectSort.h"
#include"MaxHeap.h"
#include"MergeSort.h"
#include<iostream>
using namespace std;
int main()
{
int n;
cout << "请输入待排序表中的元素个数:" << endl;
cin >> n;
dataList<int> d(n);
cin >> d;
cout << d << endl;
//BubbleSort(d);
int x = d.getRight();
//QuickSort(d,0,x);
//QuickSort_insert(d,0,x);
//ShellSort(d,0,x);
//SelectSort(d,0,x);
//HeapSort(d);
MergeSort(d);
cout << d << endl;
return 0;
}
/*
10
21 2 34 21 44 3 55 32 11 10
10
10 9 8 7 6 5 4 3 2 1
6
21 25 49 25 16 8
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -