Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

n-ary tree

807580Apr 17 2010 — edited Apr 17 2010
Hey all,
class Node{
  Object data;
  List children;
} 

class Tree{
  Node root;

  //tree methods

}
I'm terribly confused about how the levels of the tree are formed. If you have a class One, which has-a list of Two, and each of the Two's has a list of Three's, how do you insert the objects within the list per level?
I hope I'm explaining this properly.
Thanks,
-Pengu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 15 2010
Added on Apr 17 2010
1 comment
154 views