Question: Can anyone answer these questions in Python??plz Solve the following problems and justify your answers: 1. For the following binary tree: so 2 X A.

Can anyone answer these questions in Python??plzCan anyone answer these questions in Python??plz Solve the following problems andjustify your answers: 1. For the following binary tree: so 2 XA. (2 pts) is the tree full? B. (2 pts) is thetree complete? C. (2 pts) What is the tree's height? D. Listthe nodes in the tree in the order they would be visitedduring a a. (4 pts) Pre-order traversal b. (4 pts) Level-order traversalC. (4 pts) Post-order traversal d. (4 pts) In order traversal 1.

Solve the following problems and justify your answers: 1. For the following binary tree: so 2 X A. (2 pts) is the tree full? B. (2 pts) is the tree complete? C. (2 pts) What is the tree's height? D. List the nodes in the tree in the order they would be visited during a a. (4 pts) Pre-order traversal b. (4 pts) Level-order traversal C. (4 pts) Post-order traversal d. (4 pts) In order traversal 1. (2 pts) What is the time complexity to search a full BST? * B 1 2 3 X Y 1. (2 pts) What is the time complexity to search a full BST? 1. The following questions refer to the same BST. The operations are cumulative: A. (2 pts) Show the BST that would result from inserting the items 35, 20, 30, 50, 45, 60, 18, 25 in this sequence. B. (2 pts) Show the BST that would result after removing item 35 (promote in order successor). C. (2 pts) Show the BST that would result after removing item 18 (promote in order successor). D. (2 pts) How would the trees in the previous problems look differently if we promote in order predecessors instead of successors? 1. (2 pts) Given the following tree, perform the appropriate rotations to bring it back into balance: B D F Implementation Question (14 pts) Write a program that implements and tests an AVL tree remove(item) method. This method accepts an item to remove. If the item is in the tree, the method removes the item, re-balances the tree, and returns True . If the item is not in the tree, False is returned. Bonus (3 pts) Read about Huffman coding. 1. (1 pt) In a Huffman tree, the item with the highest frequency of occurrence will have a code with what trait? 2. (2 pts) In the table below, fill in the code for each symbol shown in the following Huffman tree: space a h r S n Symbol Code Space a e h i n O r S t t

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!