You are viewing a single comment's thread. Return to all comments →
C++ (more at https: //github.com /IhorVodko/Hackerrank_solutions , feel free to give a star :) )
int findMergeNode( SinglyLinkedListNode * _head1 , SinglyLinkedListNode * _head2 ){ auto node1 = _head1; auto node2 = _head2; while(node1 != node2){ node1 = node1->next ? node1->next : _head1; node2 = node2->next ? node2->next : _head2; } return node1->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 →
C++ (more at https: //github.com /IhorVodko/Hackerrank_solutions , feel free to give a star :) )