How many different binary trees and binary search trees can
be made from three nodes that contain the key values 1, 2 & 3?
Answer Posted / gurwinder
no.of binary trees=n!*(2^(n)-n)
no.of bst's=n*[2^(n)-n]
if 1,2,3 are key nodes
then:
no. of BST=15
no. of binary trees= 30
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
How do you find the time complexity of a bubble sort?
How to do the intersection of two sorted arrays?
Evaluate the following prefix expression " ++ 26 + - 1324" (Similar types can be asked)
What is list and its types?
How do you implement a stack?
Which sorting algorithm is used in arrays sort?
What is difference between concurrenthashmap and hashtable?
Can you sort a hashset?
What is basic data structure?
Explain heapsort. What is its complexity?
List out the advantages of using a linked list?
Why is sorting necessary?
Describe what is Node in link list? And name the types of Linked Lists?
What do you mean by quadratic probing?
What is binary search in programming?