Binary Search & Balanced Trees

Answer & solution
Official answer: 64.0 : 64.0
Our answer: 64
Height6 with seven nodes means every node lies on one chain. The first inserted value must be the smallest or largest remaining key; otherwise both subtrees would be nonempty and the tree could not be a chain. Recursively choose either endpoint for each of the first six insertions, with the last forced. This gives 26=64 distinct insertion orders.
For a chain, all remaining keys must fall on one side of each successive root. Thus the smallest or largest key is chosen repeatedly. This counts insertion permutations, not merely final shapes. For three keys the valid orders are 123,132,312,321, illustrating the recurrence C(k)=2C(k−1), C(1)=1.