Merge pull request #5915 from eugenp/fix-merge-sort

small fix in merge sort
This commit is contained in:
Loredana Crusoveanu 2018-12-14 00:05:29 +02:00 committed by GitHub
commit ed1edc91c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ public class MergeSort {
while (i < left && j < right) {
if (l[i] < r[j])
if (l[i] <= r[j])
a[k++] = l[i++];
else
a[k++] = r[j++];