A binary search tree on 7 nodes with height 6 must be a single chain: all 7 nodes lie on the longest root-to-leaf path. Count the insertion orders that force this chain by choosing, at each step, the current minimum or maximum remaining key.
For the tree to have height 6 with only 7 nodes, it must be completely skewed, i.e. a single chain. The root must be an extreme value (1 or 7), giving 2 choices, and then each subsequent insertion must be either the current minimum or maximum of the remaining keys, giving 2 choices for each of the next 5 insertions; the final insertion is forced. Thus the answer is \(2^6 = 64\).