Skip to content

Commit 482d84b

Browse files
committed
优化
1 parent 796990b commit 482d84b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/crossoverjie/algorithm/LinkLoop.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public boolean isLoop(Node node){
2828
Node slow = node ;
2929
Node fast = node.next ;
3030

31-
while (node.next != null){
31+
while (slow.next != null){
3232
Object dataSlow = slow.data;
3333
Object dataFast = fast.data;
3434

0 commit comments

Comments
 (0)