Whats the problem in this code?
Getting right answer but still failing all test cases
n1, n2 can be zero as well. But your code is always creating a linked list of 1 element before, irrespective of the size. Also, try to merge the two sorted linked lists recursively.
also add a new line for every test case