The Gateway to Computer Science Excellence
0 votes
69 views

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


 

in DS by (307 points)
edited by | 69 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

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,297 answers
198,265 comments
104,977 users