Results 1 to 3 of 3
  1. #1
    chopo1980 is offline Member
    Join Date
    Nov 2009
    Rep Power

    Exclamation Binary search tree search method

    I have created a tree ( contains name and age)

    now i have to create a method that takes the name as an input searches the tree and returns name and age.

    i am not sure how to start this taks.

    Thank you for time and ideas.

  2. #2
    rdtindsm is offline Member
    Join Date
    Feb 2009
    Rep Power


    wikopedia can have have good articles on computer science topics. Their article on searhing binary trees has as much info as you will likely need.

    Binary search tree - Wikipedia, the free encyclopedia

    They even have java code.

  3. #3
    CodesAway's Avatar
    CodesAway is offline Senior Member
    Join Date
    Sep 2009
    Rep Power


    Without presenting your code, it will be difficult to give anything but vague advice. For example, are you using your own tree implementation or one in Java's standard library?

    First off, is the tree a binary tree? Is the tree sorted by name (since you want to search by name)?
    CodesAway -
    writing tools that make writing code a little easier

Similar Threads

  1. Binary Search Tree
    By anmadie in forum New To Java
    Replies: 5
    Last Post: 11-17-2009, 03:39 AM
  2. Binary Search Tree implementation
    By Ceasar in forum Advanced Java
    Replies: 5
    Last Post: 10-13-2009, 04:43 PM
  3. Replies: 5
    Last Post: 10-13-2009, 02:35 PM
  4. Binary Search Tree
    By Goo in forum New To Java
    Replies: 0
    Last Post: 03-06-2009, 05:46 PM
  5. Binary Search Tree
    By michael_mke in forum New To Java
    Replies: 3
    Last Post: 12-04-2008, 03:03 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