I am getting error while merging the two list
Hello @anshulgurawalia you have missed return when you are adding at head.
Write return when you are done with adding node.
Can you edit the code ?
not giving the correct output manually i check the merge function by passing two linked its working fine but when i pass a single linked list the output is given is only a single node please check please check my merge_sort function
@anshulgurawalia you are trying to do merge sort in two sorted linked list?
or trying to sort the linked list using merge sort?