Update LinkedListAlgo.java

fix
This commit is contained in:
victor 2019-03-26 15:03:05 +08:00 committed by GitHub
parent 4e75d73e00
commit 0747104188
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,13 +20,8 @@ public class LinkedListAlgo {
pre = curr;
curr = next;
}
//我的比教程更加简洁
if (pre == null) {
return list;
} else {
return pre;
}
}
// 检测环
public static boolean checkCircle(Node list) {