Tries 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 = 491733)
Suppose that you insert the following sequence of 7 strings into a multiway trie (R = 3):

1221 11 312 21 221 1222 32

How many (non-null) nodes does the resulting trie contain (including the root node)?

Question 2

(seed = 194047)
Suppose that you insert the following sequence of 7 strings into a ternary search trie:

242 553 342 422 111 142 414

What are the depths of the nodes corresponding to the last characters in the 7 strings
(in the order the strings were inserted)? Recall: the depth of the root node is 0.

0 1 2 3 4 5 6
-----------------------------------
key 242 553 342 422 111 142 414
depth
    
You cannot submit your work until you agree to the Honor Code. Thanks!