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
How is bubble sort done?
Can we override compareto method for enumerations?
What are the different types of linked list?
In what scenario, binary search can be used?
How to create an Array?
What are control structures?
How are the elements of a 2d array are stored in the memory?
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.
Advanced problems related to Data Structures were asked
Which is faster hashset or treeset?
What is the function of stack?
How does variable declaration affect memory allocation?
Briefly explain recursive algorithm 50 how do you search for a target key in a linked list?
Write the steps involved in the insertion and deletion of an element in the stack.
Explain linked list in short.