search
Log In
0 votes
158 views

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


 

in DS
edited by
158 views
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

1 Answer

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

Related questions

2 votes
1 answer
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$
asked Jan 18, 2017 in DS smartmeet 218 views
6 votes
2 answers
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 )
asked Jan 6, 2017 in DS Çșȇ ʛấẗẻ 793 views
2 votes
4 answers
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$?$
asked Jan 26, 2016 in DS learncp 328 views
1 vote
2 answers
4
283 views
What is the time complexity to delete the root node in right skew tree? I knew the three cases of BST deletion:- 0 child,one child,two child. But how can we handle this particular question
asked Oct 6, 2017 in Programming rahul sharma 5 283 views
...