sir the code is showing time limit error. please help.
Merge sorted linked lists problem
For each test case you have to consider two new linked lists.
So the statements - node *head1 = NULL and node *head2 = NULL should be inside the while(t–) loop