how to find the number of possible tree in the given tree.
Answers were Sorted based on User's Feedback
Answer / baskerdearer
number of possible tree = (2 power n) - n.
A tree contain three node.
possible tree = 8 - 3 = 5.
|Is This Answer Correct ?||178 Yes||26 No|
Answer / mandeep
the formula is (2^n)-n.
where n=no.of nodes
|Is This Answer Correct ?||67 Yes||15 No|
Answer / vikram_tp
you all are going wrong...
the formula which u have given is only working when n=2 or 3..
bt when n=4 the ans should be 14 not 12
when n=5 ans is 42 and not what comes by the formula...
so there isnt any formula for this..u have to count then by generating the trees by urself...
|Is This Answer Correct ?||18 Yes||0 No|
Answer / m.vinothkumar
no. of possible trees=(2^n)-n.
where n=no.of nodes
I FOUNDED THIS CORRECT FORMULA FROM GRAPHICS FROM
|Is This Answer Correct ?||26 Yes||9 No|
Answer / himani
(2^n)-n. where n is no. of nodes
|Is This Answer Correct ?||20 Yes||7 No|
Answer / xyz
|Is This Answer Correct ?||8 Yes||8 No|
Answer / sudip
If there are 3 nodes A,B and C. In which A is root and B and
C are it's left and right child...
Then if we want to count the no. of tree..then..
A A A A-alone, B -alone and
/ \ / \ C-alone and the last
B C B C one is null tree.
I think there will be 7 subtrees if we null is subtree then,..
no. of tree = 2^n - 1.
|Is This Answer Correct ?||1 Yes||14 No|
Answer / rohit
Question is wrong XXXX
it should be how to find no. of distinct binary tree ????
ANSWER IS--- (1/(n+1))*2nCn
|Is This Answer Correct ?||6 Yes||22 No|
Answer / tauqueer
if n=3 then
3/ \3 3/ \3
|Is This Answer Correct ?||4 Yes||20 No|
Answer / gaurav tripathi
|Is This Answer Correct ?||3 Yes||22 No|
Explain what are the major data structures used in the hierarchical data model?
What is quick sort?
Questions related to arrays, such as given a 2 integer array, find the common elements.
What is comparable interface?
Differentiate between queue and stack.
Mention one advantage and disadvantage of using quadratic probing?
Explain recursive function & what is the data structures used to perform recursion?
State the difference between queues and linked lists?
How can one find a cycle in the linked list? IF found how to recognize the cycle and delete that cycle?
What is a cycle or a circuit?
List the types of rotations available in splay tree?
What is the difference between b tree and binary search tree?