1.11M Members

Arraylist<node> based trees

 
0
 

hi all
i have to implement arraylist<node> base tree(one parent may have more than two children). i did not work with node can you help me to create the tree

 
0
 

what have you done so far?

 
0
 

what have you done so far?

i'm a beginner of java.can you help me to create the tree?

 
0
 

hi all
i have to implement arraylist<node> base tree(one parent may have more than two children). i did not work with node can you help me to create the tree

i'm a beginner of java.can you help me to create the tree?

 
0
 

we can help you correct your code, we're not going to code it for you.
Do you know how to work with (Array)Lists and Generics?

if not, and you're indeed a beginner just starting up, leave stuff like this untill you've got a better hang of java programming.

 
0
 

we can help you correct your code, we're not going to code it for you.
Do you know how to work with (Array)Lists and Generics?

if not, and you're indeed a beginner just starting up, leave stuff like this untill you've got a better hang of java programming.

i'm working with arraylist

 
0
 

i'm working with arraylist

i can implement the binary tree in java. at least help me to insert the children into the arraylist here one parent may have more than two children

 
0
 

Have you read the API doc for the ArrayList class?
Do any of its methods look like they would "insert" an element into the list?
Have you tried any of the methods to see what they do?
Try writing a small, simple program that creates an ArrayList and add elements to it.

 
0
 

Have you read the API doc for the ArrayList class?
Do any of its methods look like they would "insert" an element into the list?
Have you tried any of the methods to see what they do?
Try writing a small, simple program that creates an ArrayList and add elements to it.

now i have to create dynamic children tree.a single array-list is possible to do this?
for example i have to create this kind of tree

7
/ | \
2 7 12
/ | \ / \ / \
1 2 3 6 8 11 13

here each parent has average of children. here i have three condition such as (consider the child node as x) 1<=x<=5,6<=x<=10,x>=11.here i have three group of children.how can separate this group of children from a single array-list. is it possible or not. if it is possible can you give me a code to insert the children in array-list (with example).

 
0
 

Yes, I think you can do it.

 
0
 

Yes, I think you can do it.

can you give me any idea to solve this problem?

 
0
 

Are you having problems with your code?
Please post your code and your questions.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article