run error on submit
Merge Sorted Linked Lists run-error
hey @mddanish, please do not share code directly from outside sources. Watch the video, write you own code and if find any error, feel free to ask again.
hey, it is my own code. it working fine for test case but show run error on submit.
hey @mddanish, as your program has too many functions cycle,addcycle. I thought it was from other sources.
Now coming to your code, you code is not working when there t>1, it is not able to create Linked list for other testcases.
For example:
4
2
1 1
2
1 1
3
1 2 3
3
4 5 6
4
1 2 3 4
0
2
1 1
2
-1 2
Your debugged output
1 1 1 1
correct output
1 1 1 1
1 2 3 4 5 6
1 2 3 4
-1 1 1 2
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.