Search:

Type: Posts; User: asdee

Search: Search took 0.19 seconds.

  1. Replies
    11
    Views
    356

    Re: help me with this code

    i have done like this is it correct or not??


    public int less(int n) // return how many number are less than n appear in tree
    {
    if(parent == null)
    return 0;
    else
    if(...
  2. Replies
    11
    Views
    356

    Re: help me with this code

    my steps for first method
    search for numbers that is less than n in tree
    then count these number
    and my steps for the second acutlly i do not understand this method so i can not put steps for it...
  3. Replies
    11
    Views
    356

    Re: help me with this code

    i have write in public int less (int n)
    {if (parent == null)
    return 0; // this mean that if the tree is empty return 0
    else
    count the numbers that are less than n
    }

    --- Update ---

    this...
  4. Replies
    11
    Views
    356

    Re: help me with this code

    yes I am confuse about how to write these method
    help me please ??
    thanks in advance

    --- Update ---

    i have write in public int less (int n)
    {if (parent == null)
    return 0; // this mean that...
  5. Replies
    11
    Views
    356

    Re: help me with this code

    I comment beside each method what it should return ???
  6. Replies
    11
    Views
    356

    help me with this code

    I have two methods which are
    public int less(int n)
    public int nth (int n)
    I can not solve them can help me please??
    this is my code


    public class BST
    { private BTNode<Integer> root;
Results 1 to 6 of 6