You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void mergeSort(vector<int>& nums, int l, int r) {// range is [l, r), so if there is a 0-index array arr whose length is n, "mergeSort(arr, 0, n)" should be called
251
-
if (r - l <= 1) {
250
+
void mergeSort(vector<int>& nums, int l, int r) {// sort the range [l, r), so if there is a 0-index array arr whose length is n
251
+
if (r - l <= 1) { //and you want sort the whole array, "mergeSort(arr, 0, n)" should be called
0 commit comments