[algogeeks]

2010-12-11 Thread parth panchal
how are you -- 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this

Re: [algogeeks]

2010-12-11 Thread Abhishek Goswami
Is it any puzzle On 11 Dec 2010 16:07, parth panchal parthpancha...@gmail.com wrote: how are you -- 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,

Re: [algogeeks] Longest interval with maximum sum

2010-12-11 Thread ADITYA KUMAR
@amir can u explain a bit more... On Tue, Dec 7, 2010 at 10:09 PM, Amir hossein Shahriari amir.hossein.shahri...@gmail.com wrote: @jai : since sum of all values in C is between -n and n the last step can be done in O(n) time and O(n) space On Sun, Dec 5, 2010 at 12:44 PM, jai gupta

[algogeeks] find the number.

2010-12-11 Thread Naresh A
Given range of numbers between A and B (A= B) Find the number within given range which has more number of iterations as per the following n { stop ; return iteration number } if n=1; n = 3n+1 if n is odd n = n/2 if n is

[algogeeks] Re: find the number.

2010-12-11 Thread Dave
@Naresh: The sequence of numbers generated by this rule for any given starting number is called a Collatz Sequence. Try googling it. Here is a list of the number of iterations required for n between 1 and 10,000: http://oeis.org/A006577/b006577.txt. Maybe that will help. Dave On Dec 11, 7:20 

RE: [algogeeks] Re: program for evaluation of remainders

2010-12-11 Thread Shiv Shankar
Hi, I agree with ankit sablok. And if we get the factorial of n in 1!, 2!, 3! Etc. Then we can find the number easily. In its complexity will be O(N) -Original Message- From: algogeeks@googlegroups.com [mailto:algoge...@googlegroups.com] On Behalf Of Dave Sent: Friday, December 10,

[algogeeks] Re: program for evaluation of remainders

2010-12-11 Thread Dave
Are all of you talking about getting the result in closed form, so that no loop is involved? Other than mine, I haven't seen an implementation of a working algorithm. Let's see your code! My algorithm avoids calculating the factorials, which overflow 32-bit integers for N 12, and is