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

How is bubble sort done?

464


Can we override compareto method for enumerations?

580


What are the different types of linked list?

470


In what scenario, binary search can be used?

564


How to create an Array?

561






What are control structures?

536


How are the elements of a 2d array are stored in the memory?

619


For the following COBOL code, draw the Binary tree? 01 STUDENT_REC. 02 NAME. 03 FIRST_NAME PIC X(10). 03 LAST_NAME PIC X(10). 02 YEAR_OF_STUDY. 03 FIRST_SEM PIC XX. 03 SECOND_SEM PIC XX.

798


Advanced problems related to Data Structures were asked

541


Which is faster hashset or treeset?

509


What is the function of stack?

475


How does variable declaration affect memory allocation?

1318


Briefly explain recursive algorithm 50 how do you search for a target key in a linked list?

577


Write the steps involved in the insertion and deletion of an element in the stack.

910


Explain linked list in short.

527