interview_python icon indicating copy to clipboard operation
interview_python copied to clipboard

交叉链表求焦点,修改了一下后面那个解答是错误的

Open lpdswing opened this issue 4 years ago • 1 comments

遍历完长链表直接就返回了肯定不对啊

lpdswing avatar May 20 '20 09:05 lpdswing

    l1 = headA
    l2 = headB
    while l1 != l2:
        l1 = l1.next if l1 else headB
        l2 = l2.next if l2 else headA
    return l1

starrye avatar Jan 14 '21 08:01 starrye