给一个链表,若其中包含环,请找出该链表的环的入口结点,否则,输出null。
链表中环的入口结点
http://www.nowcoder.com/questionTerminal/253d2c59ec3e4bc68da16833f79a38e4
import java.util.HashSet;
public class Solution {
    HashSet<listnode> set = new HashSet<>();
    public ListNode EntryNodeOfLoop(ListNode pHead)
    {
        set.add(pHead);
        while(pHead.next!=null){
            if(set.contains(pHead.next)){
                return pHead.next;
            }
            set.add(pHead.next);
            pHead = pHead.next;
        }
        return null;
    }
}</listnode>

