|
-
March 23rd, 2006, 02:34 PM
#1
Find a common node in two Linked lists
I've two Linked lists which cross. Means they have a common node after which they become one linked list giving it a Y shape. How do I determine whether there's common node in two linked lists or not.
If you put in foe loop for two linked list of lemngth m and n respectively, the complexity would come (m*n). So any optimized solution?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|