mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-10 04:06:51 +08:00
Merge pull request #6 from janeyziqinglin/janeyziqinglin-patch-6
Update 面试题02.07.链表相交 python版本
This commit is contained in:
@ -160,6 +160,8 @@ class Solution:
|
||||
那么,只要其中一个链表走完了,就去走另一条链表的路。如果有交点,他们最终一定会在同一个
|
||||
位置相遇
|
||||
"""
|
||||
if headA is None or headB is None:
|
||||
return None
|
||||
cur_a, cur_b = headA, headB # 用两个指针代替a和b
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user