tag:blogger.com,1999:blog-4070434216759110691.post851442953449411364..comments2024-01-31T09:20:26.818-08:00Comments on codingfreak: Detecting First Node in a Loop in the ListUnknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-4070434216759110691.post-44857860704590278882013-02-14T16:08:01.731-08:002013-02-14T16:08:01.731-08:00Sorry I guess you missed out the NOTE mentioned at...Sorry I guess you missed out the NOTE mentioned at the start of the program. If I am randomly picking the node as 6 instead of 7 then YES in that you will land in a Loop.<br /><br />But in the above example I havent picked it randomly but it is the output for floyd's cycle detection algorithm. I would update the solution same so that others will not be confused.codingfreakhttp://codingfreak.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-4070434216759110691.post-5270095823611114542013-02-14T09:44:58.134-08:002013-02-14T09:44:58.134-08:00In the 'improved' algorithm, what stops th...In the 'improved' algorithm, what stops the tortoise and hare from both cycling indefinitely if they don't happen to hit the first time? Like if the hare had started at 6 instead of 7?Anonymousnoreply@blogger.com