有人能帮助我理解如何使用合并排序的递归代码进行排序吗?void merge_sort(int arr[],int low,int up) int mid; if(low<up)//if more thanone element mid=(low+up)/2;
merge_sort(arr,low,mid);//sort</e
// source list will be empty after this operation根据教程/示例,必须在合并操作之前对列表进行排序destinationList.sort();destinationList.merge(sourceList);
我感到困惑是因为如果需要排序列表,为什么C++不通过在合并函数中调用排序</em