Balanced Search Trees Help Center

Learn more

Warning: The hard deadline has passed. You can attempt it, but you will not get credit for it. You are welcome to try it as a learning exercise.

To specify an array or sequence of values in an answer, separate the values in
the sequence by whitespace. For example, if the question asks for the first
ten powers of two (starting at 1), then the following answer is acceptable:

1 2 4 8 16 32 64 128 256 512

If you wish to discuss a particular question and answer in the forums, please
post the entire question and answer, including the seed (which can be used by
the course staff to uniquely identify the question) and the explanation (which
contains the correct answer).

Question 1

(seed = 262747)
Consider the left-leaning red-black BST whose level-order traversal is:

60 46 78 26 57 65 97 20 45 47 63 71 91

List (in ascending order) the keys in the red nodes. A node is red if the link
from its parent is red. Your answer should be a sequence of integers, separated
by whitespace.

Question 2

(seed = 707982)
Consider the left-leaning red-black BST whose level-order traversal is

38 30 75 21 33 39 99 19 22 78 ( red links = 21 78 )

What is the level-order traversal of the red-black BST that results after
inserting the following sequence of keys:

11 29 91

Your answer should be a sequence of 13 integers, separated by whitespace.

Question 3

(seed = 79221)
Which of the following statements about balanced search trees are true? Check all that apply. Unless otherwise specified, assume that the 2-3 tree and red-black BSTs are as described in lecture (e.g., 2-3 trees are perfectly balanced and red-black BST are left-leaning red-black BSTs with internal links colored either red or black).
    
You cannot submit your work until you agree to the Honor Code. Thanks!