CODE: https://ide.codingblocks.com/s/650804
In the above code I am following the below approach:
- I made a floyd’s cycle. Let suppose we have two linked lists :
I traverse the linked list A till NULL and point the next pointer to the list B.
-
Now we can apply floyd’s cycle algorithm in it.
-
For linked lists which do not intersect have no common point of intersection and also do not form cycle.
PS: Can you please tell me where is my code or approach is wrong.
