1 min readMay 19, 2020
I think the gif of tortoise and hare demonstration is doing something more than what the code snippet does. That makes it confusing to look at the gif. As per my understanding the code finds out if the linked list is cyclic, if so it return the beginning of the cycle. Else it returns null