文章目录 题意思路代码 题意 JZ23 链表中环的入口结点 给一个长度为n链表,若其中包含环,请找出该链表的环的入口结点,否则,返回null。 思路 代码 class Solution: def EntryNodeOfLoop(self, pHead): # write code here f = s = pHead while f and f.next: s = s.next f = f.next.next if s == f: f = pHead while f != s: f = f.next s = s.next return f return None