ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       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
Google
 
Categories  >>  Code Snippets  >>  Programming Code  >>  C Code
 
 


 

 
 C Code interview questions  C Code Interview Questions
 C++ Code interview questions  C++ Code Interview Questions
 VC++ Code interview questions  VC++ Code Interview Questions
 Java Code interview questions  Java Code Interview Questions
 Dot Net Code interview questions  Dot Net Code Interview Questions
 Visual Basic Code interview questions  Visual Basic Code Interview Questions
 Programming Code AllOther interview questions  Programming Code AllOther Interview Questions
Question
Given n nodes. Find the number of different structural
binary trees that can be formed using the nodes.
 Question Submitted By :: Vadivel152
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.
Answer
# 1
2^n-1
 
Is This Answer Correct ?    7 Yes 17 No
Rk
 
  Re: Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.
Answer
# 2
It is possible to form 2^n - 1 binary trees with n nodes.
 
Is This Answer Correct ?    5 Yes 16 No
V.suresh Kumar
 
 
 
  Re: Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.
Answer
# 3
m =   1   2   3   4   5   6   7   8  
n=1    1  
2  1  1  
3  2  2  1  
4  5  5  3  1  
5  14  14  9  4  1  
6  42  42  28  14  5  1  
7  132  132  90  48  20  6  1  
8     429  429  297  165  75  27  7  1  

 (2n)!/[(n+1)!n!]
 
Is This Answer Correct ?    25 Yes 6 No
Hitesh Viradiya
 
  Re: Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.
Answer
# 4
it is 2^n-n trees.
 
Is This Answer Correct ?    0 Yes 9 No
Ss
 
  Re: Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.
Answer
# 5
answer: 2^n-2
 
Is This Answer Correct ?    0 Yes 6 No
Maverick
 
  Re: Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.
Answer
# 6
No. of labeled binary tree :

n^(n-2)

No. unlabeled binary tree :

(2n)!/[(n+1)!.n!] (this is known as catlon number)
 
Is This Answer Correct ?    1 Yes 1 No
Durga Prasad Sahoo
 
  Re: Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.
Answer
# 7
it's Ω((4^n)/(n^(3/2)))
 
Is This Answer Correct ?    0 Yes 0 No
A.s.
 

 
 
 
Other C Code Interview Questions
 
  Question Asked @ Answers
 
main() { int c=- -2; printf("c=%d",c); }  1
main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }  1
#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }  1
How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com Deshaw9
main() { int i=5; printf("%d",++i++); }  1
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. Synergy2
main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }  1
program to find the roots of a quadratic equation HP3
Is the following code legal? struct a { int x; struct a b; }  1
main() { { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); } } a. 256, 256 b. 512, 512 c. 256, 512 d. Compile error HCL1
void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(“%d”, i); }  1
main() { int i = 3; for (;i++=0;) printf(“%d”,i); }  1
main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }  1
main() { char not; not=!2; printf("%d",not); }  1
#define SQR(x) x * x main() { printf("%d", 225/SQR(15)); } a. 1 b. 225 c. 15 d. none of the above HCL1
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }  1
main() { int i; float *pf; pf = (float *)&i; *pf = 100.00; printf("\n %d", i); } a. Runtime error. b. 100 c. Some Integer not 100 d. None of the above HCL1
main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a[4]='d'; abc(a); } abc(char a[]){ a++; printf("%c",*a); a++; printf("%c",*a); }  1
void main() { int const * p=5; printf("%d",++(*p)); }  1
Is the following code legal? struct a { int x; struct a *b; }  1
 
For more C Code Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com