mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-14 17:32:35 +08:00
Update ShellSort.java
This commit is contained in:
@ -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];
|
||||
}
|
||||
|
Reference in New Issue
Block a user