Question: please explain the code, don't just write the answer.. thank you ! A strictly increasing list is a list each of whose elements has a

please explain the code, don't just write the answer.. thank you !

please explain the code, don't just write the answer.. thank you !

A strictly increasing list is a list each of whose elements has a value that is less than the one that follows it. For example, 3 7 8 10 is a strictly increasing list, but 3 8 7 10 is not (8 is not less than 7), and 3 7 7 10 is not (7 is not less than 7). If x and y are Linked Lists whose nodes form two strictly increasing lists, calling x.writeDiff (y) writes out, one per line, all elements of x that are not in y. For example, if x contains 2 3 5 8 9 and y contains 3 5 6 7 8 10, then x.writeDiff (y) would write, one per line, the values 2 and 9. The member function writeDiff calls a helper function wd, which accepts two Node pointers; if each points to a (possibly empty) strictly increasing linked list of Nodes, it writes out the values, one per line, that are in the first list but not the second. In the space below, write a recursive implementation of the wd member function. You should assume that each of the lists is a (possibly empty) strictly increasing list. You will receive a score of zero on this problem if the body of your wd member function is more than 20 statements long or if it contains any occurrence of the keywords while, for, or goto. void Linkedlist::wd (const Node* pi, const Node* p2) const

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!