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
Can we use Generics with the array?
Why is data structure?
Is binary tree balanced?
How does hashset work internally in java?
What happens if an array goes out-of-bounds?
Where will be the free node available while inserting a new node in a linked list?
Which list does not allow duplicates?
Evaluate the following prefix expression " ++ 26 + - 1324" (Similar types can be asked)
Can treemap have duplicate values?
What do you mean by probing?
How would you use qsort() function to sort the name stored in an array of pointers to string?
Define a priority queue?
What method is used to place a value onto the top of a stack?
What do you mean by hash function?
Is duplicate allowed in hashmap?