 Data Structures and Algorithms 
with Object-Oriented Design Patterns in Java
Data Structures and Algorithms 
with Object-Oriented Design Patterns in Java 
  
  
  
  
 The implementation the NaryTree class is very similar to that of the GeneralTree class. The NaryTree class definition also comprises three fields--key, degree, and subtree. The first, key, represents the root node of the tree. The second, an integer degree, records the degree of the root node of the tree. The third, subtree, is an array of NaryTrees. This array contains the subtrees of the given tree.
 
  
  
  
  
 
 Copyright © 1998 by Bruno R. Preiss, P.Eng.  All rights reserved.
Copyright © 1998 by Bruno R. Preiss, P.Eng.  All rights reserved.