Merge pull request #429 from Hero22/master

the second array may have residual elements.
This commit is contained in:
Christian Bender
2018-05-18 22:40:28 +02:00
committed by GitHub

View File

@ -85,6 +85,12 @@ class MergeSort implements SortAlgorithm {
i++;
k++;
}
while (j <= right) {
arr[k] = temp[j];
j++;
k++;
}
}
// Driver program