//借助哈希表(unordered_set)可快速求解
class Solution {
public:
ListNode entryNodeOfLoop(ListNode head) {
unordered_set[HTML_REMOVED] hash;
ListNode* cur=head;
while(cur){
if( hash.find(cur) == hash.end() ){
hash.insert(cur);
cur=cur->next;
}
else break;
}
return cur;
}
};