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 / shalini
binary search tree=(2^n)-n i.e (2^3)-3=5
binary tree=((2^n)-n)*n! i.e ((2^3)-3)*3!=30
this is the right answer!!!!
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
Is null allowed in list?
What is ascii sort order?
What is difference between static and dynamic array?
What is the use of prototype?
What do you mean by general trees?
Give a real time example of stack
Which sorting algorithm is worst?
How do you find the height of a binary tree?
Name two algorithms two find minimum spanning tree?
What are skew trees? For a tree with 4 nodes draw all possible binary? Generalize for n nodes how many binary trees can be drawn?
Model a data structure for a DFA that takes an event as parameter and performs a desired action.
What does quick sort do?
Does linkedhashset allow duplicates?
How would you implement two stacks using a single array?
What is precision in data structures?