@sachin, you are wrong.
Here is correct algorithm from 
Wikipedia<http://en.wikipedia.org/wiki/Floyd%27s_cycle-finding_algorithm#Tortoise_and_hare>
.
Slow anf fast meet eaach other at node 9. Then loop node is equidistant from 
the start node 1 and node 9.
So move from the head and current node.
When they intersect, the starting loop found.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to