Results 1 to 1 of 1

Thread: building a tree

  1. #1
    vendetta is offline Member
    Join Date
    Jan 2010
    Rep Power

    Default building a tree

    I am trying to make a class to build a basic binary tree. If we have a root as item #1, the next item added (#2) would be its left child. The next item added (#3) would be placed as the right child. The method would sense there are out of options and to go to the far left and use the next depth: Item #4 would be the left child of item #2 and item #5 would be the right child of #2 as well. This would just keep continuing as items are added. Is it possible to do this?
    Last edited by vendetta; 02-26-2010 at 10:32 PM.

Similar Threads

  1. Building to a .jar in Netbeans 6.7.1
    By Gregadeaux in forum New To Java
    Replies: 0
    Last Post: 12-14-2009, 04:00 AM
  2. Creating a Tree and then saving the Tree
    By jackmatt2 in forum New To Java
    Replies: 0
    Last Post: 08-22-2009, 01:51 PM
  3. ignore links when building file tree
    By itaipee in forum New To Java
    Replies: 1
    Last Post: 07-28-2009, 07:41 PM
  4. help needed regarding tree building
    By invincible_me in forum New To Java
    Replies: 2
    Last Post: 08-12-2008, 02:44 PM
  5. building a house
    By dc2acgsr99 in forum Java Applets
    Replies: 4
    Last Post: 03-08-2008, 12:18 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