Well gaurav, i think by this method you can only check for a cycle in the list. If u have any idea how can you implement this to solve originally posted problem?
On Sat, Mar 27, 2010 at 9:03 AM, gaurav kishan <[email protected]>wrote: > Hi, > > Keep two pointers both initially pointing to Head. > Move first pointer one by one and the second pointer by two nodes in each > iteration. > When second pointer next link points to head again,return first pointer. > > Please let me know if this can be further imporved upon or there is some > fallacy in the approach. > > Regards, > Gaurav. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<algogeeks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Vikrant Singh -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
