If head pointer of two linked lists are given, what will be the algorithm to check if the given linked lists are connected at some points along their lengths or have one or more common nodes, provided the algorithm to be used must have time complexity of O(n) or better.

# To check if linked lists are connected

**kaaviya**#2

The two linked lists merge at the intersection point. Therefore there’s only one intersection point.

For the algorithm, check out : https://www.geeksforgeeks.org/write-a-function-to-get-the-intersection-point-of-two-linked-lists/