Intersection Node In Two Linkedlist Using Floyad Cycle Method
easy
1. Given the heads of two singly linked-lists headA and headB 2. Return the node at which the two lists intersect. 3. If the two linked lists have no intersection, return null.
Constraints
0 <= N <= 10^6
Format
Input
Input is managed for you.
Output
Output is managed for you.
Example
Sample Input
4
14 12 8 7
2
4
7 2 6 5
Sample Output
8