Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 545fa6d

Browse files
hoop208hustcc
authored andcommitted
Update 4.shellSort.md (#36)
修正希尔排序java实现的gap计算
1 parent a2443c8 commit 545fa6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎4.shellSort.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public class ShellSort implements IArraySort {
9999
int[] arr = Arrays.copyOf(sourceArray, sourceArray.length);
100100

101101
int gap = 1;
102-
while (gap < arr.length) {
102+
while (gap < arr.length/3) {
103103
gap = gap * 3 + 1;
104104
}
105105

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /