COMP1927 13s1 COMP1927 13s1 Final Exam Computing 2
[Instructions] [C language]
[Q1] [Q2] [Q3] [Q4] [Q5] [Q6] [Q7] [Q8] [Q9]

Question 7 (4 marks)

Consider the following 2-3-4-tree, where the numbers repesent key values stored in the tree nodes and the upper-case letters are labels on the nodes for you to use in answering the question:

  1. Show the contents of each of the tree nodes (A,B,C,D) after the key value 15 is inserted into the tree. If any new nodes are created, show their contents as well, and identify them by E, F, G, etc.

Red-black trees were devloped as an alternative representation for 2-3-4-trees that could use (almost) standard binary search tree nodes.

  1. What is the difference between red-black tree nodes and standard binary search tree nodes?

  2. Does every 2-3-4-tree have a unique representation as a red-black tree?

Type the answer to this question into the file called q7.txt and submit it using the command:

submit q7