关于陌生的写法
  • 板块灌水区
  • 楼主plokmnjiu
  • 当前回复1
  • 已保存回复1
  • 发布时间2024/9/18 15:49
  • 上次更新2024/9/18 19:36:05
查看原帖
关于陌生的写法
525033
plokmnjiu楼主2024/9/18 15:49
void MergeSort(int* a, int n)
{
    assert(a);
	int* tmp = (int*)malloc(sizeof(int) * n);
	if (tmp == NULL)
	{
		perror("malloc");
		exit(-1);
	}
 
	_MergeSort(a, 0, n - 1,tmp);
 
	free(tmp);
	tmp = NULL;
}

正在回顾一下归并排序,在网上找到这样的代码,请问它在干什么

2024/9/18 15:49
加载中...