Question: Write a function called findMax that prints the maximum value in a linked list. To achieve this you will have to rely on the struct

Write a function called findMax that prints the maximum value in a linked list. To achieve this you will have to rely on the struct Node and class LinkedList defined below struct Node int key; Node *next; Node *previous; Node (int k, Node *n, Node p)t key k; next n; previousp; 1; class LinkedListt private: Node Shead; Node *search(int value): public: LinkedList(){head = NULL;}; void addNode(int value, int newVal); void printList) void findMax(); 3: You only have to implement findMax(.) as search(...), addNode(), and printList(. are already implemented for you in the backend Note: the function header should be void findMax() not void LinkedList::find Max(0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
