Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please can someone help me with the correct answers for question 3, 4 and 5?...T

ID: 3824044 • Letter: P

Question

Please can someone help me with the correct answers for question 3, 4 and 5?...This is C programming.

void printnode(TreeNode* node) {printnode(node rightarrow left); printnode(node rightarrow right); printf("%d ", (int)*(node rightarrow value);//prints the value of node} printnode(root); The above code is: an in-order traversal of the tree starting at root and prints all the values in order. a post-order traversal of the tree starting at root and prints all the values but not in order. a post-order traversal of the tree starting at root and prints all the values in order. a pre-order traversal of the tree starting at root and prints all the values but not in order. a pre-order traversal of the tree starting at root and prints all the values in order. an in-order traversal of the tree starting at root and prints all the values but not in order. Trees typically have multiple paths from the root to a leaf. True False To insert a node into a binary search tree, start by searching for the node value. When you reach a leaf node, add the new node as a left child if its value is smaller than the leafs or otherwise add it as a right child. True False

Explanation / Answer

Q3 ) It does a LEFT, RIGHT, ROOT --> So its Post Order Traversal of Tree

Post order traversal of tree starting at root and prints all the values but not in order

Answer is b
===========================

4) FALSE : Trees do not have multiple path from root to that leaf, There is a single path from root to leaf Node


5) TRUE : this is how we add node to BST, start from root and keep searching until we end up in leaf and then decide left or right based on our node value, If its greater bthan leaf then new Node will be to its right otherwise left

Thanks, let meknow if there is any concern.