0

Hello,

I was just wondering if anyone knows where I can find a GOOD tutorial on Red Black trees in JAVA? I was reading the Mark Allen Weiss book on Datastructure's but I don't understand much... especially when it comes to the insertions and deletion. Finding useful and concrete information about Red Black Trees seem difficult!

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by Rashakil Fol
0

Maybe you should read what you have more slowly and carefully. If you can't understand something just because it's not laid out for you in just the comfortable manner, you need to learn how.

0

Maybe you should read what you have more slowly and carefully. If you can't understand something just because it's not laid out for you in just the comfortable manner, you need to learn how.

I think I am doing my best at all times. I've been reading through the same pages for 10+ hours with no success. So I am trying to find a better tutorial which explains it in a way that I can understand. :)

0

>I was just wondering if anyone knows where I can find
>a GOOD tutorial on Red Black trees in JAVA?

This tutorial uses C, but it's easily translated into Java. I think it's one of the better ones out there, but I'm biased. :D

>I was reading the Mark Allen Weiss book on Datastructure's
My feeling on his book is "meh". It's not exceptional either in code or explanation of red black trees. In general, books fail to follow through completely on the parts that people have most trouble with, such as deletion.

0

The approach I recommend taking to red-black trees is to (1) understand the constraints of a red-black tree and why they mean the tree is balanced, and (2) implement the tree yourself, in a convenient programming language.

It's fairly straightforward to understand why the constraints lead to a balanced tree -- they just implicitly bound the depth of the tree. The rest is just implementation details, and that's something you understand best by implementing it. Figure out how to add and remove elements while maintaining the constraints, yourself.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.