Skip to content

Commit 2bdf572

Browse files
committed
fix : select gap
1 parent 433fe81 commit 2bdf572

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SortingAlgorithm/Java/ShellSort/ShellSort.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class ShellSort {
3737
private static int getGap(int length) {
3838
int index = 0;
3939
int len = (int)(length / 2.25);
40-
while (gap[index++] < len);
40+
while (gap[index] < len) index++;
4141
return index;
4242
}
4343

0 commit comments

Comments
 (0)