Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lpdswing opened this issue May 20, 2020 · 1 comment
Open

Comments

@lpdswing
Copy link

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

@starrye
Copy link

starrye commented Jan 14, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants