There is another solution which I think is worth sharing . Traverse till the end of one linked list then connect this end to starting of second linked list . Now the Y - shaped Lists are actually P - shaped . And then it becomes the case of finding a loop and its position in linked list . Which I think you might know the answer . By the way this question was asked from me in McAfee campus interview .
-- 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.
