Similar questions 4 more →
Binary Search & Balanced Trees

Answer & solution
Answer: B (no official key was published)
1. Partition all trees by their root’s rank k. No key greater than the root may be in its left subtree, so the sizes are forced rather than chosen. For each left shape any right shape is allowed; multiply within a fixed k and sum over the disjoint root choices. Empty subtrees contribute T(0)=1.
2. If the root is the kth smallest key, its left subtree contains k−1 keys and its right subtree n−k. Their shapes can be chosen independently, giving T(k−1)T(n−k). Thus the missing argument x=n−k, B, with T(0)=1.