import java.util.HashSet; public class Solution { public ListNode EntryNodeOfLoop(ListNode pHead) { HashSet<ListNode> set = new HashSet<>();//定义hashset ListNode cur = pHead; while (cur!=null){//遇到空节点说明没有环,退出 if (set.contains(cur)) return cur;//若set集合中已经包含该节点,则返回该节点 ...