https://ide.codingblocks.com/s/56118
what is wrong in this code??
i am trying to merge two sorted linked lists
https://ide.codingblocks.com/s/56118
what is wrong in this code??
i am trying to merge two sorted linked lists
Hi Vishesh, dry-run your code for a sample test-case. And you have not taken the number of testcases as an input. You need to take the number of testcases as an input before the for loop.
Hey Vishesh, there are some mistakes in your code
https://ide.codingblocks.com/s/56739
now getting run error on submitting but running properly on codeblocks.
please tell what is going wrong
Hi Vishesh, consider the following cases:
3
1 2 3
0
Expected output: 1 2 3
Your output:
0 0 0 2
0 0 0 0
0 0 0 0
Input:
2
4 4
2
4 4
Expected output: 4 4 4 4
Your output:
4 4 4 4 4 4 4 4 4 2 4 4
4 4 4 4 4 4 4 4 4 4 4 4