Re: [algogeeks] Re: number of BST's

2010-08-02 Thread ankur aggarwal
the calatan number can be derived using the code given above.. plz confirm by using wiki.. try 2 find derivation of catalan number.. On Mon, Aug 2, 2010 at 11:34 AM, bujji wrote: > Number of BST with n keysf(n) = [ \sum_{ i=1 to n} f(i-1)* f(n- > i) ] > > Root node can be any of n keys. i

Re: [algogeeks] Re: number of BST's

2010-08-01 Thread Manjunath Manohar
int count(int node) { int sum=0;i,left,right; for(i=0;ihttp://groups.google.com/group/algogeeks?hl=en.

Re: [algogeeks] Re: number of BST's

2010-07-31 Thread jalaj jaiswal
catalan number works fine On Sat, Jul 31, 2010 at 4:55 PM, Soumya_Prasad_Ukil wrote: > @above, >result is incorrect for n=4. It should print 14. > > > On 31 July 2010 16:44, Manjunath Manohar wrote: > >> the number of unique binary trees which can be formed with n nodes is >> (2^n)-n

Re: [algogeeks] Re: number of BST's

2010-07-31 Thread Soumya_Prasad_Ukil
@above, result is incorrect for n=4. It should print 14. On 31 July 2010 16:44, Manjunath Manohar wrote: > the number of unique binary trees which can be formed with n nodes is > (2^n)-n > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Ge

Re: [algogeeks] Re: number of BST's

2010-07-31 Thread Manjunath Manohar
the number of unique binary trees which can be formed with n nodes is (2^n)-n -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algo