I wrote code for merging 2 sorted linked lists, but it passes only one test case and gives wrong ans for all others
link to solution
Not getting the error in code
Hi @pgarg,
In ur code, if number of elements in a list is 0, it is still asking for input which is not correct and because of this, it might be giving wrong answer.
Try adding this edge case in ur code.
Hope dis resolves ur doubt.
if u still find any trouble, feel free to post ur query here.