how to find the number of possible tree in the given tree.
Answer Posted / 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 |
Post New Answer View All Answers
What actions are performed when a function returns?
What is the best complexity of bubble sort?
Does arraylist extend list?
What is the two-dimensional array?
Which is the slowest sorting algorithm?
What is scalar example?
Can hashmap have same key?
What is the purpose of sorting?
When is a binary search algorithm best applied?
how to add an item to the beginning of the list?
What is precision?
Traverse the given tree using Inorder, Preorder and Postorder traversals. Inorder : D H B E A F C I G J Preorder: A B D H E C F G I J Postorder: H D E B F I J G C A
Which is better hashmap or arraylist?
What is an ordered map?
Can a hashset contain duplicates?