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
Get step-by-step solutions from verified subject matter experts
