Question: 4) [35 points] Binary Trees: In this question you may only use the struct and the functions below. If you want to use any other
4) [35 points] Binary Trees: In this question you may only use the struct and the functions below. If you want to use any other function, you need to implement it. /Binary Tree node struct BTnode int data; struct BTnode left; struct BTnode right; struct BTnode parent li typedef struct BTnode BTnode t // creates a BTnode_t data-value, and all pointers set to NULL BTnode_ create_node(int value) (a) [12 points] What are the Inorder, Preorder and Postorder traversals of the (b) [8 points] Draw two different trees T, and T with all values in T, distinct, such that preOrder(T)-preOrder(T2) and postOrder(T)postOrder(T2 (c) [10 points] Write an algorithm that gets two sequence of distinct ints (no repetitions), representing the inorder and the preorder traversals of some binary tree, and returns the tree. For example, if inOrder-I1,2,3,4] and preOrder-13,2,1,4], then the unique binary tree is
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
