Catalan Number - "So the first post"
4 posters
Catalan Number - "So the first post"
All of us has been bugged by "Catalan Number".....right....
So here we go...list all the problems out here whose answer is Catalan Number.
So here we go...list all the problems out here whose answer is Catalan Number.
shivang- Posts : 42
Join date : 2009-01-30
Age : 35
Re: Catalan Number - "So the first post"
how many binary search trees are possible for n given nodes..???
the ans is catalan no only..
i.e. 2nCn/(n+1)
the ans is catalan no only..
i.e. 2nCn/(n+1)
$corpion- Posts : 25
Join date : 2009-01-30
Age : 37
Re: Catalan Number - "So the first post"
in that case....the question was wrong...i mean even i thought it is the catalan number...but the answer wasnt in the options
i guess they used the formula pow(2,n) - n
can anyone tell which of these two formulae shud b applied when????
i guess they used the formula pow(2,n) - n
can anyone tell which of these two formulae shud b applied when????
Lincoln Rhyme- Posts : 1
Join date : 2009-01-30
@Ashwin
ohh...u are asking about that mock ques right....
by the way the answer to that ques is pow(2,n)-n
it comes as follows...
it was asked that how many different trees(not binary trees) are possible for n nodes....so a tree can be of nodes with 1 child, 2child.....n child......so the anwer comes out to be pow(2,n)-n...
this negative n comes as a tree with nodes having no child is not possible
hope you got your answer....
by the way the answer to that ques is pow(2,n)-n
it comes as follows...
it was asked that how many different trees(not binary trees) are possible for n nodes....so a tree can be of nodes with 1 child, 2child.....n child......so the anwer comes out to be pow(2,n)-n...
this negative n comes as a tree with nodes having no child is not possible
hope you got your answer....
shivang- Posts : 42
Join date : 2009-01-30
Age : 35
Similar topics
» typecasting-"ek chota sa doubt story!!!"
» Majority Number: Vikas Sir
» Oh my God! :Large Prime number
» difference between c/c++ - "Not all C is C++"
» Tree traversal
» Majority Number: Vikas Sir
» Oh my God! :Large Prime number
» difference between c/c++ - "Not all C is C++"
» Tree traversal
Permissions in this forum:
You cannot reply to topics in this forum
|
|