1. Engineering
  2. Computer Science
  3. 4 5 points correctness constructing a redblack tree draw...

Question: 4 5 points correctness constructing a redblack tree draw...

Question details

4. (5 points - Correctness) Constructing a Red-Black Tree: Draw the Red-Black tree that would be obtained by sequentially inserting the values 1 through 8 in the following order 4,2,3,1,6, 5,7,8 You do not need to show the intermediate steps; the final tree is enough. Indicate which nodes are red and which ones are black either by including color in your diagram, or by writing ror b next to each node. 5. (5 points - Correctness) AVL versus Red-Black trees: Suppose we want to store one million unique values in a binary search tree, and we expect that after inserting the data we will only need to use thefind (element) operation to search for about 10 values. Would an AVL tree or a Red-Black tree likely be more efficient for this purpose? Briefly explain your reasoning.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution