Authors:

Walter Savitch ,kenrick Mock

Chapter:

Linked Data Structures

Exercise:

Programming Projects

Question:2 | ISBN:9780132846813 | Edition: 5

Write a function called mergeLists that takes two call-by-reference arguments that are pointer variables that point to the heads of linked lists of values of type int . The two linked lists are assumed to be sorted so that the number at the head is the smallest number, the number in the next node is the next smallest, and so forth. The function returns a pointer to the head of a new linked list that contains all the nodes in the original two lists. The nodes in this longer list are also sorted from smallest to largest values. Note that your function will neither create nor destroy any nodes. When the function call ends, the two pointer variable arguments should have the value NULL.

*Sorry the answer is not available at the moment…*

If you are able to** find the answer**, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.

Spread the **'tradition of sharing'. **