@@ -0,0 +1,963 @@
+/**%0A * Write a program to find the node at which the intersection of two singly linked lists begins.%0A */%0Apublic class Solution %7B%0A  public ListNode getIntersectionNode(ListNode headA, ListNode headB) %7B%0A    if (headA == null %7C%7C headB == null) return null;%0A    int countA = 1;%0A    int countB = 1;%0A    ListNode cloneA = headA;%0A    ListNode cloneB = headB;%0A%0A    while (cloneA.next != null %7C%7C cloneB.next != null) %7B%0A      if (cloneA.next != null) %7B%0A        cloneA = cloneA.next;%0A        countA ++;%0A      %7D%0A%0A      if (cloneB.next != null) %7B%0A        cloneB = cloneB.next;%0A        countB ++;%0A      %7D%0A    %7D%0A%0A    if (cloneA != cloneB) return null;%0A%0A    ListNode longer = countA %3E countB ? headA : headB;%0A    ListNode shorter = countA %3E countB ? headB : headA;%0A    for (int i = 0; i %3C Math.abs(countA - countB); i ++) %7B%0A      longer = longer.next;%0A    %7D%0A%0A    while (longer != shorter) %7B%0A      longer = longer.next;%0A      shorter = shorter.next;%0A    %7D%0A    return longer;%0A  %7D%0A%7D

Add leetcode 160