Starting from:

$29.99

Lab 05 - Nodes Problems

Lab 05 - Nodes Problems
Direction: Submit typed work in the Labs directory of your github repositor or dropbox, or upload to the google classroom
assignment. Each part should be a separate files. The files named should be ''lab5A.cpp'' and ''lab5B.cpp'' respectively.
Part A: In class
Your objective is to write the definition of the function Maximum() whose header is
double Maximum(Node<double>* root)
It returns the maximum value from the singly linked list referenced by root. If root is referencing an empty list, the
function returns 0.
Part B: Take home
Your objective is to write the definition of the following functions
 the function MidAppend() whose header is
void MidAppend(Node<T>*& data,Node<T>* addon)
template <typename T>
It appends the linked list referenced by addon to the linked list referenced by data starting after the middle
node of data. For instances, if data = [a, b, c, d, e] and addon = [f, g, h, i, j]; then after the call of the function,
data = [a, b, f, g, h, i, j, c, d, e].
 the function NotEqual() whose header is
bool NotEqual(Node<bool>* op1,Node<bool>* op2)
Given that op1 and op2 references doubly linked lists that represent binary numbers, the function returns true
if the list referenced by op1 is not equal the list referenced by op2 . For instances, if op1 = [0, 0, 1, 1, 0] and
op2 = [1, 0, 0, 1], the function will return true. Do not assume that the lists are the same size.

More products