is it 5? One gate question was like that

0 votes

0

it is ordered tree not binary tree ? if binary tree ans must be 5.

my doubt , what is the meaning of ordered tree ??

my doubt , what is the meaning of ordered tree ??

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

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