Results 1 to 2 of 2
  1. #1
    baltazar is offline Member
    Join Date
    Jul 2007
    Rep Power

    Default Implementing a red-black tree in java

    How do I implement a red-black tree in java. I am new to Java and have no clue how to proceed.
    I need to be able to print out the tree as well.
    Can someone help?!!

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Rep Power


    That is not different than any other language.

    First you need to understand its algorithm. After understanding the algorithm fully, try to design it. Decide whether it will be an object oriented solution or not.. If it will be an object oriented solution, try to find your objects. You don't need the find most generic solution in this design, just try your best. In fact you can even write the code as a combination of function calls just like in C.

    After you start coding, if you need help on Java side (e.g. getting input or using a library class), let us know. We will try to help you.

Similar Threads

  1. Tree structure using JAVA
    By trill in forum Advanced Java
    Replies: 2
    Last Post: 05-27-2010, 11:02 AM
  2. Binary Tree Implementation in Java
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-16-2008, 10:35 PM
  3. Java Grapical Tree
    By Deo Favente in forum Reviews / Advertising
    Replies: 3
    Last Post: 02-18-2008, 06:12 AM
  4. Why this image background is black ?
    By samson in forum Java 2D
    Replies: 1
    Last Post: 07-17-2007, 04:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts