Question: Write a recursive C function called findmax() that recursively searches two linked lists for the maximum integer. The function returns a pointer to the Node

Write a recursive C function called findmax() that recursively searches two linked lists for the maximum integer. The function returns a pointer to the Node that contains the maximum integer. If the maximum integer occurs more than once, then return a pointer to any of the possible nodes. The lists must also contain an equal number of nodes. Note: the lists may be empty.

Assume that struct node is defined as follows:

typedef struct node { int data; struct node *pNext; } Node; Use the following function header: Preconditions: Length(pList1) == Length (pList2); pMax == NULL

Node * findMax (Node *pList1, Node *pList2, Node *pMax) { }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!