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 / poornakala
for binary search tree, no of trees, (2^n)-n... here 8-3=5
trees... u can draw n see...
for binary tree, no of trees n(2^n)-n here 3*5=15...
replace node in each bst with other two values and see....
| Is This Answer Correct ? | 72 Yes | 48 No |
Post New Answer View All Answers
What you mean by sorting?
What's the difference between an array and vector?
What is a sorting algorithm in data structure?
How can we remove loops in a linked list? What are the functions of fast and slow pointers?
What is the use of hashtable?
Explain the Linked List
What is the minimum number of nodes that a binary tree can have?
How do you reference all the elements in a one-dimension array?
Draw a binary Tree for the expression : A * B - (C + D) * (P / Q)
What is stable sort?
Define union-by-weight?
List the types of rotations available in splay tree?
Can the double-checked locking fail on a single processor system?
How do you rotate an AVL tree?
Write an algorithm to show various operations on ordered list and arrays