Re: [algogeeks] Re: doubt in spoj 8473 ways

2011-12-17 Thread sourabh singh
@anubhav i too didn't find it on google bt may be it is: f(n)= ((4n-2)/n)*f(n-1)n1 2 n=1 On Fri, Dec 16, 2011 at 8:07 AM, anubhav raj anubhaw@gmail.com wrote: @samm:i hv googled it several time bt by code no path r ways as a tag bt cudnt get ne

[algogeeks] Any book suggestion for Data structure and algo.

2011-12-17 Thread Abhishek Goswami
-- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at

Re: [algogeeks] Re: doubt in spoj 8473 ways

2011-12-17 Thread sourabh singh
@all got AC 114 still i think without some other way to input/output it hard to get below 100. can some1 suggest some better (smaller ) way to i/o integers On Sat, Dec 17, 2011 at 1:31 AM, sourabh singh singhsourab...@gmail.comwrote: @anubhav i too didn't find it on google bt may be it is:

Re: [algogeeks] Any book suggestion for Data structure and algo.

2011-12-17 Thread Rahul
Google this 6.046 You should not ask any more suggestion till you complete the above On Sat, Dec 17, 2011 at 3:07 PM, Abhishek Goswami zeal.gosw...@gmail.comwrote: -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group,

Re: [algogeeks] Any book suggestion for Data structure and algo.

2011-12-17 Thread Abhishek Goswami
Cool Rahul On Sat, Dec 17, 2011 at 3:09 PM, Rahul raikra...@gmail.com wrote: Google this 6.046 You should not ask any more suggestion till you complete the above On Sat, Dec 17, 2011 at 3:07 PM, Abhishek Goswami zeal.gosw...@gmail.comwrote: -- You received this message because

Re: [algogeeks] Any book suggestion for Data structure and algo.

2011-12-17 Thread Rahul
If you have time then Do a Google this www.algo-class.org On Sat, Dec 17, 2011 at 3:13 PM, Abhishek Goswami zeal.gosw...@gmail.comwrote: Cool Rahul On Sat, Dec 17, 2011 at 3:09 PM, Rahul raikra...@gmail.com wrote: Google this 6.046 You should not ask any more suggestion till you

Re: [algogeeks] Any book suggestion for Data structure and algo.

2011-12-17 Thread Abhishek Goswami
ya Sure Thx bro On Sat, Dec 17, 2011 at 3:15 PM, Rahul raikra...@gmail.com wrote: If you have time then Do a Google this www.algo-class.org On Sat, Dec 17, 2011 at 3:13 PM, Abhishek Goswami zeal.gosw...@gmail.comwrote: Cool Rahul On Sat, Dec 17, 2011 at 3:09 PM, Rahul

[algogeeks] doubt on normalization coding

2011-12-17 Thread rameshbabu kovuru
hai friends this is ramesh . i need c or cpp code for normalisation ,how the normlaiztion will be performed on a realtion up to third normal formplease... if any one knows about it please send that code ..please please... -- You received this message because you are subscribed to

Re: [algogeeks] doubt on normalization coding

2011-12-17 Thread atul anand
No homework post please. On Sat, Dec 17, 2011 at 6:26 PM, rameshbabu kovuru rameshbabukv...@gmail.com wrote: hai friends this is ramesh . i need c or cpp code for normalisation ,how the normlaiztion will be performed on a realtion up to third normal formplease... if any one knows about

Re: [algogeeks] Re: doubt in TSUM

2011-12-17 Thread Karthikeyan V.B
Hi, *TSUM:* This is also a brute-force approach.. Pls correct me if i m wrong Algorithm: 1.sort the array 2.find the sum of the three min elements - sum_min 3.find the sum of the three max elements - sum_max 4.for each value in [sum_min,sum_max] binary search for the triplet int

Re: [algogeeks] Re: Suggest Algo for this Question

2011-12-17 Thread atul anand
@Lucifer : if for the same question , we consider a Max heap instead of Min heap then complexity of the same algo will be O(N) ... right??? On Fri, Dec 16, 2011 at 8:50 PM, Lucifer sourabhd2...@gmail.com wrote: @my previous post.. While explaining the run-time I have made an editing

Re: [algogeeks] zig zag problem

2011-12-17 Thread atul anand
please see the algo and let me know if i am doing it wrong:- toggle= arr[i+1] arr[i]; subseq=0; for( i=0 ; ilen ;i++) { if ( toggle == 1) { if( arr[i+1] arr[i]) { subseq=subseq+2; }

[algogeeks] Re: doubt in TSUM

2011-12-17 Thread SAMMM
You will not be able to get the correct solution with this algo becoz ur algo will not able to generate all the 3 triplets sum. You hav to loop through all the triplets ... take for example the numbers :- 1 2 3 5 6.. Ur algo will generate the following triplet sum as 9 10 12 8 6 11 13 10 14

Re: [algogeeks] Re: doubt in spoj 8473 ways

2011-12-17 Thread anubhav raj
@saurav: if you dnt mind cn i c ur code...like earlier your post was also related to f(n) bt it wz out f d limit -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To

[algogeeks] suggest algo

2011-12-17 Thread Ankur Garg
suggest algo to find k most frequently occuring numbers from a file of very large size containing numbers. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from

[algogeeks] Re: doubt in TSUM

2011-12-17 Thread SAMMM
@All , The problm can be solved by Fast Fourier Transform . The Concept used here is to Convert the number in the array into a vector and Then apply multiplication using FFT . The below example will clear it . I will start will finding Pair of all Number equal to every possible combination

Re: [algogeeks] Re: doubt in spoj 8473 ways

2011-12-17 Thread sourabh singh
@anubhav No,i can't post an AC code here . takes all fun out of spoj problem solving thing. i can just hint that i used the function posted earlier and u don't need to make a function single for loop will do. that's it try harder. buddy :-) btw it got ac 111 later :-). On Sat, Dec 17, 2011

[algogeeks] Re: Suggest Algo for this Question

2011-12-17 Thread Lucifer
@atul.. Complexity would be 2(n-k+1) = O(2*(n-k)) Basically the condition based on which the traversal is performed will change. I have modified some part of the original post to show that: Instead of having the initial count as K have it as N-K+1 .. when taking a max-heap.. To solve the

[algogeeks] A new app!!

2011-12-17 Thread naveen ms
My friend has developed an iphone gaming app and has launched it on app store .Here are the links to the app intro and sample video of that.Have a glimpse of that.. With regards, Naveen M S This is itunes download link http://itunes.apple.com/us/app/naughty-eggs/id486789170?ls=1mt=8 Follow on

Re: [algogeeks] Re: doubt in TSUM

2011-12-17 Thread prathamesh sonpatki
@SAMMM Hi Nice Solution.How did u relate it to FFT ? On Sat, Dec 17, 2011 at 9:56 PM, SAMMM somnath.nit...@gmail.com wrote: @All , The problm can be solved by Fast Fourier Transform . The Concept used here is to Convert the number in the array into a vector and Then apply multiplication