参考:算法第四版
想看图解的话:C++ 归并排序与快速排序
手残,不会画
简介:
上图来源:https://blog.csdn.net/zpznba/article/details/83745205
代码:
#include<iostream>
#include<ctime>
using namespace std;
void Individual(int A[], int size)
{
srand((unsigned)time(NULL));
for (int i = 0; i < size; i++)
A[i] = rand() % 100;
}
void Output(int A[], int size)
{
cout << endl;
for (int i =