Last active
November 11, 2020 14:55
-
-
Save biningo/6012b6ebda9ca4855c2a05ed2afa4fef to your computer and use it in GitHub Desktop.
love
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p1 = headA;p2 = headB | |
while p1!=p2: #速度一样 路程一样 最终一定会相遇 ♥ | |
p1,p2 = headB if p1==None else p1.next,headA if p2==None else p2.next | |
return p1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment