I have several different types of tree nodes, each of which may have anywhere from 0 to 5 children. I\'m trying to figure out an algorithm to generate all possible trees of
If the only difference between node types is the number of children, then generating every possible tree with only the node type with the greatest number of children will also generate every possible tree for any combination of nodes having equal or fewer children.
That's sort of a mouthful...
Put another way, if 5 children is the maximum, then some of the possible trees made of only 5-children nodes will have nodes that have, for example, two actual children, and three null pointers. This is practically the same as having a node with only two children.