Data Structures and Algorithms with Object-Oriented Design Patterns in C#
next up previous contents index

Fields

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.


next up previous contents index

Bruno Copyright © 2001 by Bruno R. Preiss, P.Eng. All rights reserved.