edited by
1,698 views
1 votes
1 votes
Consider an empty binary search tree of height $-1.$We need to fill the following sequence of numbers in it $: 11, 12, 13, 14, 15, 16, 17.$The number of ways in which the numbers  can be inserted in an empty binary search tree, such that the resulting tree has height $6,$ is _____________

$A)2$                        $B)4$                          $C)32$                     $D)64$
edited by

1 Answer

0 votes
0 votes
Empty BST with height -1, so when we insert given nodes root node will be at height 0.
There is 2 BST possible with height 6 from the given keys.

1.      11 → 12 → 13 → 14 → 15 → 16 → 17
2.      17 → 16 → 15 → 14 → 13 → 12 → 11

Related questions

4 votes
4 votes
1 answer
1
ramakrushna asked Dec 31, 2021
1,335 views
The number of insertion sequences of the numbers {1,2,3,4,5,6,7} which would lead to the following BSTHow to tackle this kind of problem. Anyone!
1 votes
1 votes
1 answer
2
0 votes
0 votes
1 answer
4