@@ -0,0 +1,796 @@
+/**%0A * Definition for singly-linked list.%0A * public class ListNode %7B%0A *     int val;%0A *     ListNode next;%0A *     ListNode(int x) %7B%0A *         val = x;%0A *         next = null;%0A *     %7D%0A * %7D%0A */%0Apublic class Solution %7B%0A    public ListNode getIntersectionNode(ListNode headA, ListNode headB) %7B%0A        if(headA == null %7C%7C headB == null)%7B%0A            return null;%0A        %7D%0A        HashMap%3CListNode, Integer%3E hm = new HashMap%3CListNode, Integer%3E();%0A        %0A        while(headA != null)%7B%0A            hm.put(headA, 1);%0A            headA = headA.next;%0A        %7D%0A        while(headB != null)%7B%0A            if(hm.containsKey(headB))%7B%0A                return headB;%0A            %7Delse%7B%0A                hm.put(headB, 1);%0A                headB = headB.next;%0A            %7D%0A        %7D%0A        return null;%0A    %7D%0A%7D

Q160 Intersection of Two Linked Lists