Re: Red Black Guaruntees




<jehugaleahsa@xxxxxxxxx> wrote in message
So here is the question: is it possible to have non-adjacent red nodes
and an equal number of black nodes from the leafs to the root and for
the red black tree to be imbalanced?

A red black tree cannot become grossly unbalanced. You need to check that yours genuinely is a red-black tree. A test function is easy to write.

It could be that your comparision function is the inefficiency.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

.