You are viewing a single comment's thread. Return to all comments →
my C code 😎😁
int findMergeNode(SinglyLinkedListNode* head1, SinglyLinkedListNode* head2) { struct SinglyLinkedListNode* q1; struct SinglyLinkedListNode* q2; q1=head1; q2=head2; while (q1 != q2) { if (q1->next == NULL) q1 = head2; else q1 = q1->next; if (q2->next == NULL) q2 = head1; else q2 = q2->next; } return q1->data; }
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 →
my C code 😎😁