given two descending sorted linked list merge them into a third list in descending order. Assume you have a function named merge list which takes two linked lists heads as input input and merge them somehow. Implement Merge_list() only
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
Below is the algorithm of Merge_list() function needed
Merge_list(Node a,Node b) if a is NULL and b is NULL return NULL if a is NULL return b if b is NULL return a Node c //Combined List if((*a).value>(*b).value) c=a (*c).next=MergeSorted((*a).next,b) else c=b (*c).next=MergeSorted(a,(*b).next) return c
Kindly revert for any queries
Thanks.
Get Answers For Free
Most questions answered within 1 hours.