Intersection Point of Two Lists

Given the head of two linked lists, find out if they intersect and return the point of intersection.

Statement

Given the head nodes of two linked lists, return the node at which the two lists intersect. We will return null if we do not find any intersection between the two linked lists.

Note: The input linked list will not have cycles in it.

Example

In the below example, lists do not intersect each other.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.