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

    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
    Posts
    92
    Rep Power
    0

    Default

    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
    Location
    Texas
    Posts
    238
    Rep Power
    6

    Default

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