Redblack « tree « Java Collection Q&A

Home
Java Collection Q&A
1.algorithm
2.array
3.Array Byte
4.Array Char
5.Array Convert
6.Array Dimension
7.Array Integer
8.Array Object
9.Array String
10.ArrayList
11.collection
12.comparator
13.Development
14.Garbage Collection
15.Generic
16.hash
17.HashMap
18.HashTable
19.iterator
20.LinkedList
21.List
22.Map
23.queue
24.Set
25.Sort
26.tree
Java Collection Q&A » tree » Redblack 

1. Red-black tree - how to rotate if root is the grandparent?    stackoverflow.com

I am working on writing red-black tree myself. But when I test the rotation that involves root to be rotated, somewhat it loses reference. Tree structure:

       ...

2. Red-black tree - How to find the node's parent?    stackoverflow.com

In red-black tree, when rotate, you need to know who is the parent of particular node. However, the node only has reference to either right or left child. I was thinking to ...

3. Red-Black tree rebalance problem?    stackoverflow.com

Is there any constraint onto compareTo method which orders objects put into the standard java TreeSet (i.e. collection implemented as Red-Black tree)? I have

public class RuleTuple implements Comparable {
   ...

4. Red/Black Trees    java-forums.org

Yeah no problem, been too long since I implemented a RB tree form me to say comfortably, but since you can follow the rules and sometimes shift either right or left depending on how you coded, you could in theory get different results. However, I remember in my class back in the day, there was only one result, perhaps because we ...

5. Implementing a red-black tree in java    forums.oracle.com

Once you have learned those things, you should have no problem. You might also want to learn how to use google and wikipedia to help you learn #1 and #2 above. As you're proceeding, if you have specific questions, post them here, along with your work so far. Make sure to provide details about what you've done and what difficulty you're ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.