Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 808ad67

Browse files
committed
160 小修改
1 parent 1cc38b0 commit 808ad67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Algorithms/0160.intersection-of-two-linked-lists/intersection-of-two-linked-lists.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ func getIntersectionNode(headA, headB *ListNode) *ListNode {
1414
}
1515
a, b = a.Next, b.Next
1616
if a == nil && !hasLinkedToB {
17-
hasLinkedToB = true
1817
a = headB
18+
hasLinkedToB = true
1919
}
2020
if b == nil && !hasLinkedToA {
21-
hasLinkedToA = true
2221
b = headA
22+
hasLinkedToA = true
2323
}
2424
}
2525
return nil

0 commit comments

Comments
 (0)