1,138 views
3 3 votes
The number of BST possible with 6 node numbered 1,2,3,4,5 and 6 with exactly one leaf node

2 Answers

1 1 vote
I think its 2^5 =32

as it's given, it has only 1 child for  the given BST

Hence it can have a structure of form 1-2-3-4-5-6 ; 6-5-4-3-2-1; 6-5-1-4-3-2 etc.

similarly, we have 2^5=32 possibilities
Position:
Show:

Related questions

10 10 votes
1 1 answer
359
359 views
GO Classes asked Jul 28
359 views
A binary tree has:$1000$ nodes in the left subtree $100$ nodes in the right subtreeHow many nodes are processed before the root in preorder, inorder, and postorder traver...
7 7 votes
1 1 answer
215
215 views
GO Classes asked Jul 13
215 views
Which of the following functions correctly returns the total number of nodes in a binary tree rooted at $\texttt{t}$?int tree_size(TreeNode *t) { if (t == NULL) return 0;...
11 11 votes
1 1 answer
265
265 views
GO Classes asked Jul 11
265 views
Which of the following can be the number of nodes in a complete binary tree?$2$ $5$ $7$ $8$
6 6 votes
1 1 answer
227
227 views
GO Classes asked Jul 11
227 views
A node of a binary tree is called nearly balanced if one of the following holds:The node is a leaf. The node has one child and that child is a leaf. The node has two chil...