1.Show the list configuration resulting from each series of list operations using the List ADT of Figure 4.1 and the list notation described by the author in Section 4.1 of your text. For example, < 20, 23 | 12, 15> describes a list consisting of values 20, 23, 12, and 15 in that order and the current position is at value 12. Assume that lists L1 and L2 are empty at the beginning of each series. Show where the current position is in the list.

(a)
L1.append(10);
L1.append(20);
L1.append(15);

(b)
L2.append(10);
L2.append(20);
L2.append(15);
L2.moveToStart();
L2.insert(39)
L2.next();
L2.insert(12);

2.Traversals - Modify the following preorder traversal to perform an inorder traversal of a binary tree.

template < typename E>
void preorder(BinNode< E>* root) {
if (root == NULL) return; // Empty subtree, do nothing
visit(root); // Perform desired function
preorder(root->left());
preorder(root->right());
}

"template < typename E>" "void preorder(BinNode< E>* root)"

3.What is a K-ary tree and what distinguishes it from general trees?

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.