-
The number of ways in which the numbers 1, 2, 3, 4, 5, 6, 7 can be inserted in an empty binary search tree, such that the resulting tree has height 6, is ________.
Note : The height of a tree with a single node is 0.
-
- 16
- 53
- 8
- 64
Correct Option: D
To fill 7 levels with 7 elements, at each level we have exactly 2 possible options like 1 and 7 for root one corresponding to making it left skewed and other right skewed. This is valid for all levels upto 6.
Hence, 26 = 64.