Update ShellSort.java

This commit is contained in:
littleFoot1
2020-04-16 21:33:22 +08:00
committed by GitHub
parent 338fced4d5
commit 3ef9fe7140

View File

@ -22,7 +22,7 @@ public class ShellSort implements SortAlgorithm {
for (; gap > 0; gap /= 3) {
for (int i = gap; i < length; i++) {
int j;
T temp = array[i];
T temp = array[i];
for (j = i; j >= gap && less(temp, array[j - gap]); j -= gap) {
array[j] = array[j - gap];
}