# Made Easy:Programming &DS

158 views

The number of possible ordered trees with 3 nodes A,B,C is ??

in DS
edited
0
is it 5? One gate question was like that
0
no given is 12.
0
it is ordered tree not binary tree ? if binary tree ans must be 5.

my doubt , what is the meaning of ordered tree ??
1
0
thanku..
0

@sandeep singh gaur

Is there in made easy any explanation given?

if given please post solution

0
solution is given-

The tree maybe depth 2 or 1.if depth is 2,we have 6 possible trees.this is because one of the three nodes A,B,C may be the root and the next level may be one of the remaining 2 nodes.if depth is 1 ,the root may be one of three nodes A,B,C corrosponding to a root say A, 2 tree possible, if root b, 2 more tree possible,if root c, 2 tree possible. if depth one total 6 tree possible.

total tree=6+6=12
0
no, explanation wrong for sure

see joshi+nitish comment, u will get it
0
Thanku ma'am...!
0
ans is 30

Number of Labeled Tees = (Number of unlabeled trees) * n!
= [(2n)! / (n+1)!n!]  × n!

## Related questions

1
218 views
The minimum number of vertices having degree $1$ in a tree of at least $10$ vertices is ______________. If we consider this question, then the first answer comes in our mind is $'2',$ right? But what if Tree isn't binary? if the root node has $9$ leaf nodes, so all those nodes having degree $1,$ right$?$ So the answer could be$:9$
2
793 views
The number of BST's possible with $6$ nodes numbered $1$,$2$,$3$,$4$,$5$ and $6$ with exactly one leaf node are ....................... OR The number of BST's possible with $6$ nodes numbered $1$,$2$,$3$,$4$,$5$ and $6$ having a height of $5$ are .................… ( note :- height of a root is 0 )
3
328 views
Insert the given values in the order in initially empty $\text{AVL}$ tree. $\text{34,21,10,27,24,43,15,6}$ What is the value at the root of the tree$?$
1 vote