Question: 5 . Insert the keys: 5 , 9 , 7 , 2 , 6 , 4 , 8 , 3 , 1 , 1 0

5. Insert the keys: 5,9,7,2,6,4,8,3,1,10(in order) into an initially empty Binary Search Tree .(Note: use the Binary Search Tree Insert algorithm to do this.) a. Give the keys in the order printed by a pre-order tree walk. b. Give the keys in the order printed by a post-order tree walk. Note: the three questions below do not refer in any way to the Red Black Tree Insert algorithm. Instead they ask if it is possible to assign colors in the BST T, which you found above, so as to satisfy the RBT properties. Be sure to include nil children when computing the black-height of T. c. Is it possible to assign the colors {Red, Black} to the vertices of so that the Red-Black Tree properties are satisfied, and bh()=1? If it is possible, specify all such colorings by stating, for each coloring, the set of keys belonging to red nodes.

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 Programming Questions!