Re: [algogeeks] Prime numbers

2011-08-17 Thread Nitin Nizhawan
Hi Dod, Could you pls expalin what this algorithm is doing and from where you got it. Thanks Nitin On Wed, Aug 17, 2011 at 2:56 AM, Don dondod...@gmail.com wrote: I wrote a program to print prime numbers, but it is not very fast. Can someone help me figure out why? #include stdio.h /*

[algogeeks] Prime numbers

2011-08-16 Thread Don
I wrote a program to print prime numbers, but it is not very fast. Can someone help me figure out why? #include stdio.h /* This program implements a blindingly fast algorithm to find prime numbers, using an elegant recursive method. */ int _(int n, int m, int d, int t=0) { int r; if

Re: [algogeeks] Prime numbers

2011-08-16 Thread sandeep pandey
try to implement sieve. it,s a well known algorithm to find out d prime frequently. -- 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

Re: [algogeeks] Prime numbers

2011-08-16 Thread Sanjay Rajpal
Agree with Sandeep :) Try this link http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes. Hope it helps :) Sanjay Kumar B.Tech Final Year Department of Computer Engineering National Institute of Technology Kurukshetra Kurukshetra - 136119 Haryana, India On Tue, Aug 16, 2011 at 2:28 PM, sandeep

Re: [algogeeks] Prime numbers

2011-08-16 Thread Dipankar Patro
Sieve's is the fastest in generating prime numbers. +1 to Sandeep and Sanjay On 17 August 2011 08:21, Sanjay Rajpal sanjay.raj...@live.in wrote: Agree with Sandeep :) Try this link http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes. Hope it helps :) Sanjay Kumar B.Tech Final Year

Re: [algogeeks] Prime numbers

2011-08-16 Thread Nitin Nizhawan
Can someone pls explain what dod's algorithm is doing? Dod, from where did you get this recursive algo? On Wed, Aug 17, 2011 at 8:45 AM, Dipankar Patro dip10c...@gmail.com wrote: Sieve's is the fastest in generating prime numbers. +1 to Sandeep and Sanjay On 17 August 2011 08:21, Sanjay

[algogeeks] Prime Numbers

2011-07-23 Thread frank
what is the efficient algorith to find the prime numbers or to check a number prime or not ? Helpful if the pseudo code provided. thank you -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Prime Numbers

2011-07-23 Thread arun kumar
hope this link will help you http://www.topcoder.com/tc?module=Staticd1=tutorialsd2=primalityTesting On Sat, Jul 23, 2011 at 10:39 PM, frank abb...@gmail.com wrote: what is the efficient algorith to find the prime numbers or to check a number prime or not ? Helpful if the pseudo code provided.

[algogeeks] Prime Numbers

2011-01-25 Thread siddharth srivastava
Hi Its an easy one but still I am looking for the most efficient approach. Find first 1 million prime numbers. -- Siddharth Srivastava When you have learned to snatch the error code from the trap frame, it will be time for you to leave. -- You received this message because you are