LinkedLongest Editor 1 string longest(node* head) ill in code here Problem Statement 4 This problem provides you with a linked list composed of node objects chained together via node pointers. Each node has a next pointer which points to the next node in the chain. The last node is identified by having a NULL (or nullptr) next pointer. The linked lists for this problem store string data. Your task is simple identify the longest string stored in the linked list. If two strings are of the same length, return the string that occurred earlier in the linked list. If the linked list is empty, return the empty string Create a function longest, which takes in a pointer to the head of the linked list, and returns the longest string in the linked list The linked lists for this problem use the following class declaration (this is already available to the autograder code; do not copy this into your solution) class node public: string data; node* next; J: Notes and Constraints . The linked list starting at head contains between 0 and 10 nodes, inclusive Test Submit
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as: