# Search:

Type: Posts; User: asdee

1. ## Thread: help me with this code

by asdee
Replies
11
Views
341

### 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. ## Thread: help me with this code

by asdee
Replies
11
Views
341

### 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. ## Thread: help me with this code

by asdee
Replies
11
Views
341

### 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. ## Thread: help me with this code

by asdee
Replies
11
Views
341

### Re: help me with this code

yes I am confuse about how to write these method

--- Update ---

i have write in public int less (int n)
{if (parent == null)
return 0; // this mean that...
5. ## Thread: help me with this code

by asdee
Replies
11
Views
341

### Re: help me with this code

I comment beside each method what it should return ???
6. ## Thread: help me with this code

by asdee
Replies
11
Views
341

### 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