最典型的分治算法是归并排序
void mergeSort(vector<int>& nums, int left, int right){int mid = left + (right - left) / 2;// 1. 分:将数组分为左、右两个子数组,分别递归排序mergeSort(nums, left, mid);mergeSort(nums, mid + 1, right);// 2. 合:将排好序的左、右子数组进行合并merge(nums, left, mid, right);}
