Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
修正希尔排序java实现的gap计算 #36
Conversation
修正希尔排序java实现的gap计算
@@ -99,7 +99,7 @@ public class ShellSort implements IArraySort { | |||
int[] arr = Arrays.copyOf(sourceArray, sourceArray.length); | |||
int gap = 1; | |||
while (gap < arr.length) { | |||
while (gap < arr.length/3) { |
hustcc
Aug 13, 2019
Owner
代码规范一下。
while (gap < arr.length / 3) {
运算符号和变量之间,加一个空格,让代码不那么紧凑!
代码规范一下。
while (gap < arr.length / 3) {
运算符号和变量之间,加一个空格,让代码不那么紧凑!
hustcc
Aug 13, 2019
Owner
算了,好像其他代码都存在这个问题!
算了,好像其他代码都存在这个问题!
hoop208
Aug 13, 2019
Author
Contributor
谢谢提醒,以后会注意.
谢谢提醒,以后会注意.
修正希尔排序java实现的gap计算