Académique Documents
Professionnel Documents
Culture Documents
This assignment has four questions which carry 80 marks. Answer all the
questions. Each question carries 20 marks. You may use illustrations and
diagrams to enhance the explanations. Please go through the guidelines
regarding assignments given in the Programme Guide. Ensure that you don’t
copy the program from course material or any other source. All the
implementations should be in C language.
Question 4: Show the effect of making the following insertions into an initially
empty red-black tree:
30,40,20,90,10,50,70,60,80
Answer : 4 Every node in a red black tree is colored either red or black . they
gaurentee O(log n) time per
access to adjusting tree structure so that the following projection are always
maintained.
- the root is always black.
- Every path on the tree , from the root down to exterior , has the same number of
black
node.
- No red node has a red child.