Update SortHelper.java

This commit is contained in:
Tungstend 2023-07-12 02:45:53 +08:00
parent 49451944fb
commit 2482d040f6
1 changed files with 2 additions and 2 deletions

View File

@ -232,8 +232,8 @@ public class SortHelper {
// Insertion sort on smallest arrays
if (length < INSERTIONSORT_THRESHOLD) {
for (int i=low; i<high; i++)
for (int j=i; j>low && c.compare(dest[j-1], dest[j])>0; j--)
swap(dest, j, j-1);
for (int j=i; j>low && c.compare(dest[j-1], dest[j])>0; j--)
swap(dest, j, j-1);
return;
}