why this code is not passing all test cases?? I think this logic is correct.
i have used this logic -->
- 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).
- Now view the problem as finding the loop in the second linked list. So the problem is solved.