You are viewing a single comment's thread. Return to all comments →
why this give runtime error in tc5 and tc6
if (head1==None and head2==None): return None if(head1==None): return head2 if (head2==None): return (head1) if head1.data<=head2.data: head1.next=mergeLists(head1.next,head2) else: temp = head2 head2 = head2.next temp.next=head1 head1=temp head1.next = mergeLists(head1.next,head2) return head1
Seems like cookies are disabled on this browser, please enable them to open this website
Merge two sorted linked lists
You are viewing a single comment's thread. Return to all comments →
why this give runtime error in tc5 and tc6