How many 3 node binary trees are possible if the postorder traversal is xyz?
Answers
Answered by
25
For this specified post order I could figure out that there can be 5 binary trees possibly.
X yzzz / \ / / \ \. xyyyyy / \ / \. Xxxx.
Now there is another possibility that 2 nodes are in the left subtree and the 3rd one in the right subtree or vice versa.
Then,1:2:1=2..1:1:2=2. Total =14, Hence this is the answer.
Similar questions
Chemistry,
6 months ago
World Languages,
6 months ago
Sociology,
1 year ago
Hindi,
1 year ago
Math,
1 year ago