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


Please Help Members By Posting Answers For Below Questions

What actions are performed when a function returns?

486


What is the best complexity of bubble sort?

461


Does arraylist extend list?

446


What is the two-dimensional array?

533


Which is the slowest sorting algorithm?

493






What is scalar example?

513


Can hashmap have same key?

456


What is the purpose of sorting?

471


When is a binary search algorithm best applied?

643


how to add an item to the beginning of the list?

575


What is precision?

580


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

641


Which is better hashmap or arraylist?

486


What is an ordered map?

489


Can a hashset contain duplicates?

480