[algogeeks] Re: Frog Problem

2008-02-12 Thread macharla.pradeep
Hi, Let's see my solution, Let N is the Total number of stones, and FJ ( N ) gives total number of ways to reach FJ ( N ) = FJ ( N-1 ) + FJ ( N-2) , if N > 2 = 1 , if N ==2 or N ==1 = 0 , if N == 0. Regards, P

[algogeeks] Re: Frog Problem

2008-02-12 Thread Mahesh Gunda
easy solution.:) I think everyone knows Fibonacci's series. Mathematically..To reach K No. Of ways to reach K F(K) = F(K-1)+F(K-2) = F(J) + F(I) = No. Of wa

[algogeeks] Re: factorial

2008-02-12 Thread Dave
Sum log 1 + log 2 + log 3 + ... + log n, where log represents the base-10 logarithm function. The ceiling of the sum gives the number of digits. Dave On Feb 12, 8:17 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > how will u find the "number of digits in the factorial of a number" > without

[algogeeks] factorial

2008-02-12 Thread [EMAIL PROTECTED]
how will u find the "number of digits in the factorial of a number" without finding the factorial?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogee

[algogeeks] Stortest Subtext Problem

2008-02-12 Thread conundrum
Given a text and a set of keywords, is there a linear time algorithm to find the smallest subtext containing all the keywords (at least once) ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group.

[algogeeks] Re: Frog Problem

2008-02-12 Thread Dave
Here is a simple program to print the frog's possible paths: #include int main() { char a['K'-'A'+1]={'A'}, n=0; for( int i = 0 ; i <= (1<<('K'-'A'-2)) ; i++ ) { int j = 0; do { a[j+1] = a[j] + (((i>

[algogeeks] Re: a non-recursive algorithm that prints all the nodes of a binary tree in O(n)

2008-02-12 Thread hc busy
I agree, this seems like freshman algo homework, ask TA for a hint. The algorithm I described previously works fine. and it's probly in one of the books anyways... U need something like a Potential function, and do some monkeying around with it and it all works out. On Feb 11, 10:04 pm, Sunny <[

[algogeeks] 2GB Free Online Storage !

2008-02-12 Thread swenson rodharn
Free online photo Album, Free online auto-matic Back-up, Free Access your MP3 music online,2 GB For Free! That's right, we are happy to give you a whopping great 2GB of secure online storage where you can manage and share your files easily. For Free! Get Free Code: Limited Time Only! http://www.w

[algogeeks] Company pays to just place ads on your site

2008-02-12 Thread Share n Care Blog
Hi, Yes there's a company which pays $25 in advance just to place their ads on you site. Click here for more info . -- Yours Sincerely Team, Share N Care Blog. Please do not mark us as SPAM.If you wish to un

[algogeeks] Have you taken the new sound test as yet

2008-02-12 Thread Share n Care Blog
Hi, Have you taken the new sound test as yet. The latest technology challenge. Check it out here. -- Yours Sincerely Team, Share N Care Blog. Please do not mark us as SPAM.If you wish to unsubscribe from our mai

[algogeeks] Help

2008-02-12 Thread Atul Aggarwal
Hello everybody, I am new to algorithm and has started reading Cormen. I have no mentor to guide me. I want to verify my answers to the problems given in exercises. Does anyone having the solution to this book or I should discuss the solution with this group only? --~--~-~--~~