gettting segmentation fault
Merge linked list
hi @guptashubham210a why are you doing return here? You need to add all the nodes, if you return from here only rest of the nodes will not be added.
got it let me check by submitting
still getting segmentation fault
@guptashubham210a run your code for sample input first, make sure you are getting correct output before you submit
@guptashubham210a your insertattail function is not returning anything and neither are the nodes passed by reference, then how will anything get updated
@guptashubham210a while printing the merged list, do
headsorted = headsorted->next;
else it will be stuck in an infinite loop

why do I need to pass by reference ,I am intialising my head in makell funct if I will pass by reference then my head will changed to tail everytime,I have changed the while mistake but still getting fault
how will you update your head? It will be updated in that function only, but it is not a global variable, so its value will change in that function only. Any change you make will not be reflected in any of the other functions.
I have updated my head in make ll function so there is no need to update in insertat taiil function na?
@guptashubham210a do a dry run please, you passed the node in another function na, you made some changes there but how will they be reflected in THIS function?
ok let me check and dry run
I have dryrun it and every think is fine but why its giving fault pls tell me
@guptashubham210a you are not getting the point, you cant change any variable without passing it by reference.
can you send code ?so I can compare it with mine.
kcan you send code ?so I can compare it with mine.

