Intersection-point-linked-lists

i have used this logic -->

  1. Traverse the first linked list(count the elements) and make a circular linked list. (Remember the last node so that we can break the circle later on).
  2. Now view the problem as finding the loop in the second linked list. So the problem is solved.

why this code is not passing all test cases?? I think this logic is correct.