Bi-Tri treeComputer Science Level 2
A special tree has two types of nodes: biNodes and triNodes:
- Each biNode has either 0 or 2 children.
- Each triNode has either 0 or 3 children.
- All children (if any) of a biNode are triNodes.
- All children (if any) of a triNode are biNodes.
The root node of the tree can be of either type. The tree is complete, that is to say, at any level every node has the same number of children.
The height of the Bi-Tri tree is defined as the number of edges from the root node to a leaf.
What is the maximum number of leaf nodes that a tree of this type of height 11 may have?
For example, if the height 2, then the answer will be 6.