Re: [algogeeks] regarding start of loop in linked list

2011-11-20 Thread Amol Sharma
ya that's a better and simplified approachbut i was trying to clear rahul doubt's bcoz he was not moving the second pointer...i gave explanation for that -- Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad

Re: [algogeeks] regarding start of loop in linked list

2011-11-20 Thread kartik sachan
@amol..we can simply break the loop where we find the slow and fast pointer meeting,then its become a a problem of two link list having common ending point and different staring point and for detecting the extact point where loop began is two traverse both the list and find its length lets say 'a'

Re: [algogeeks] regarding start of loop in linked list

2011-11-20 Thread Amol Sharma
i think you misunderstood the solution.the process you are trying to do is divided into three steps let say the linked list is something like... ab | | | | | |

[algogeeks] regarding start of loop in linked list

2011-11-19 Thread rahul sharma
when a loop is found then slow=fast //pointers; then to find start we move one of any pointer at start and other at same palce and move both @ speed of 1...then where they meet is startr,,, can nyone xplain the logic behind this in simple words that how they meet at startthnx in advance -