Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
 Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE

 Categories >> Software >> Operating Systems >> Data Structures

 Windows Interview Questions (339) Linux Interview Questions (449) Unix Interview Questions (455) Solaris Interview Questions (781) RTOS Interview Questions (43) Bulnex Interview Questions (4) Operating Systems General Concepts Interview Questions (261) Data Structures Interview Questions (66) Operating Systems AllOther Interview Questions (47)
Question
```How many different binary trees and binary search trees can
be made from three nodes that contain the key values 1, 2 & 3?```
Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By

Re: How many different binary trees and binary search trees can be made from three nodes that contain the key values 1, 2 & 3?
# 21
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

 Is This Answer Correct ? 2 Yes 4 No
Shalini

Re: How many different binary trees and binary search trees can be made from three nodes that contain the key values 1, 2 & 3?
# 22
30,6
 Is This Answer Correct ? 0 Yes 2 No
Unknown

Re: How many different binary trees and binary search trees can be made from three nodes that contain the key values 1, 2 & 3?
# 23
1oth answer is xactly correst ie,BST=5 & BT=30
 Is This Answer Correct ? 5 Yes 0 No
Baljinder

Re: How many different binary trees and binary search trees can be made from three nodes that contain the key values 1, 2 & 3?
# 24
binary seach tree will be one withh 2as root node
and 1 as left child and 3 as right child of root(2).

 Is This Answer Correct ? 0 Yes 1 No
Mann

Re: How many different binary trees and binary search trees can be made from three nodes that contain the key values 1, 2 & 3?
# 25
number of binary search tree= (2n)!/{n!*(n+1)!}
and number of binary tree=(2n)!/(n+1)!

 Is This Answer Correct ? 1 Yes 0 No
Vipul

Re: How many different binary trees and binary search trees can be made from three nodes that contain the key values 1, 2 & 3?
# 26
30 binary trees 10 for each 1,2 and 3.
only 1 binary search tree as with 2 as root node 1 as right child and 3 as left child.

 Is This Answer Correct ? 0 Yes 0 No
Anonymous

Re: How many different binary trees and binary search trees can be made from three nodes that contain the key values 1, 2 & 3?
# 27
binary tree = n!(2^n - n).
for n =3 its 30.

for BST its 2n
C * [1/(n+1)]
n
for n=3 its 5.

 Is This Answer Correct ? 1 Yes 0 No
Rohit

Re: How many different binary trees and binary search trees can be made from three nodes that contain the key values 1, 2 & 3?
# 28
Formula For BST is
{(2n)!/(n!*n)}/(n+1)
So for
N=1 BST=1
N=2 BST=2
N=3 BST=5
N=4 BST=14
N=5 BST=42
and so on

 Is This Answer Correct ? 1 Yes 0 No
Hazrat Hussain

  Question Asked @ Answers Other Data Structures Interview Questions what is binary tree? BMC 12 I am given a sequential algorithm that does a routine search on an unordered list. N = 20. The probability that the value x does NOT appear in the list is exactly 60%, and the probability that x DOES appear is 40%. The 3 questions that I could not get were: A) What is the avg number of element comparisons performed when n = 20 and x does NOT appear in the List. (my answer was 20, is this correct?) B) What is the avg number of element comparisons peformed when n = 20 and x DOES appear in the list? C) What is the avg number of element comparisons performed when n = 20. This should be a single number answer they said. 3 how to search an element in sorted linked list with time complexity is O(log n). Wipro 3 Explain binary searching, Fibinocci search. IBM 5 When will you sort an array of pointers to list elements, rather than sorting the elements themselves? 5 input function and output function in c language Tcs 2 what is a complexity of linear search,binery search? ABB 7 What do you mean by Base case, Recursive case, Binding Time, Run-Time Stack and Tail Recursion? TCS 2 what is the need of data structure 11 Parenthesis are never needed in prefix or postfix expressions. Why? Microsoft 11 Q#1: An algorithm is made up of 2 modules M1 and M2.If order of M1 is F(n) and order of M2 is g (n) then what is the order of the algorithm. Q # 2 : How many binary trees are possible with 3 nodes? with 4 nodes? 4 What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm? CTS 3 For more Data Structures Interview Questions Click Here