Use the integers from one to nine to build a nine-node binary search tree with no duplicate data values
There are several trees that could be formed with the 9 values. Here is an example of one such tree.
2 4 6 8
A tree with depth 4 means that either the left or the right subtree must have a depth of 3 and the other subtree a depth less than or equal to three. So the focus is on how many elements can be in a tree of depth 3. Then when we know that we can pick all of the possible root values that will allow for the proper ...
This solution shows how to calculate the depth of a binary tree. Various configurations of the tree are considered.