Hi, only some test cases are passing, can someone pls help
Cycle detection and removal in LL
Your approach is wrong. When slow and fast pointers turn out to be equal, it does not mean that they have intersected at the point where the tail of LL meets some other node. It simply means that the two pointers are equal. Please revise the algorithm and try working out an example to get a better understanding.
I am attaching my code for reference.
If my answer is able to resolve your query, please mark the doubt as resolved.
Thank you, I understood my mistake but can you pls explain the logic you have used for finding the LL tail?