small fix in merge sort
This commit is contained in:
parent
83acd92ba5
commit
3235804ebf
|
@ -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++];
|
||||
|
|
Loading…
Reference in New Issue