You are viewing a single comment's thread. Return to all comments →
def findMergeNode(head1, head2): l1, l2 = head1, head2 dummy = {} while l1: dummy[id(l1)] = l1.data l1=l1.next while l2: if id(l2) in dummy: return dummy[id(l2)] else: l2=l2.next
Seems like cookies are disabled on this browser, please enable them to open this website
Find Merge Point of Two Lists
You are viewing a single comment's thread. Return to all comments →
Python Code