Solutions of Theory of Algorithms assignment 13.3-5

Solutions of Theory of Algorithms assignment 13.3-5 - with...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Solutions of Theory of Algorithms Assignment 6 Exercise 13.3-5 To form a red-black tree, we first insert the first node (n=1) as a root and color it with black. If we have more nodes to insert (n>1), we use RB-INSERT which colors them
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: with red. RB-INSERT then calls RB-INSERT-FIXUP, which explores three different cases. In each case of them, it colors at least one node with red color. Therefore, if n>1 the red-black tree will have at least one red node....
View Full Document

This note was uploaded on 11/09/2010 for the course CS 11841 taught by Professor Dr.ayman during the Spring '09 term at Alexandria University.

Ask a homework question - tutors are online