not getting sorted linked list
Merge sorted linked list
Hey @aattuull
1)
Your input is this:
1
4
2 3 4 5 -1
3
3 5 21 -1
But your program(main) is expecting this:
1
4
2 3 4 5 -1
3 5 21 -1
So take care of n2;
2)Your build_list function is building list in reverse way:
for input of 2 3 4 5 -1
its building 5->4->3->2->NULL
this reverses the sorted input and makes it descending
After you take care of the above two problems your code will work fine 