public ListNode getIntersectionNode(ListNode x, ListNode y) {

        ListNode xHelper = x;
        ListNode yHelper = y;

        int sizeX = 0;
        int sizeY = 0;

        // get the size of each list
        while (xHelper != null || yHelper != null) {
            if (xHelper != null) {
                xHelper = xHelper.next;
                sizeX++;
            }
            if (yHelper != null) {
                yHelper = yHelper.next;
                sizeY++;
            }
        }
        xHelper = x;
        yHelper = y;

        if (sizeX > sizeY) {
            for (int i = 0; i < sizeX - sizeY; i++) xHelper = xHelper.next;
        } else if (sizeX < sizeY) {
            for (int i = 0; i < sizeY - sizeX; i++) yHelper = yHelper.next;
        }
        // find the intersection node
        while (yHelper != null && xHelper != null) {
            if (yHelper == xHelper) return xHelper;
            yHelper = yHelper.next;
            xHelper = xHelper.next;
        }

        return null;
    }
Case: Find intersection node of two linked lists.
This can be recursively and iteratively. Iterative solution: find size of both lists and move pointer
of longer lists until it reaches the node whose length is the same as shorter list.
Then move both pointers forward one at a time until they reach the same value. if found return it
else there is no intersection point. Time Complexity is O(N)
src/problems/easy/IntersectionofTwoLinkedLists.java