/* struct ListNode { int val; struct ListNode next; ListNode(int x) : val(x), next(NULL) { } };/ class Solution { public: ListNode* FindFirstCommonNode( ListNode* pHead1, ListNode* pHead2) { unordered_map<ListNode*, int> H; ListNode* ans = nullptr; while(pHead1 || pHead2) { if(pHead1) { if(H[pHead1] == 1) { return pHead1; } H[pHead1] ++; pHead1 = pHead1 -> next; } if(pHead2) { if(H[pHead2] == 1) { return pHead2; } H[pHead2] ++; pHead2 = pHead2 -> next; } } return ans; } };