Intersection Point Of Linked Lists
easy
1. You are given a partially written LinkedList class.
2. You are required to complete the body of findIntersection function. The function is passed two linked lists which start separately but merge at a node and become common thereafter. The function is expected to find the point where two linked lists merge. You are not allowed to use arrays to solve the problem.
3. Input and Output is managed for you.
Constraints
1. Time complexity -> O(n) 2. Space complexity -> constant
Format
Input
Input is managed for you
Output
Output is managed for you
Example
Sample Input
5
1 2 3 4 5
8
11 22 33 44 55 66 77 88
2
3
Sample Output
44
Question Video