sir ye code kyu fail kar raha hi
Merge sort linked list
sir i could not understand
you r printing answer for all test cases in a single line ,
but for each test cases output should in separate line.
simply add cout<<"\n";
in the last line of while loop.
check ur updated code here ->