Whats the most efficient way to compute every prime from 0 to n without errors?
is using the sieve of Eratosthenes a good choice? I just feel like there could be a more efficient way to do this.
>>8918121
>is using the sieve of Eratosthenes a good choice?
Yes. There are other sieves that might be more efficient in certain situations.
>>8918123
where would one learn about these non-Eratosthenian sieves
>>8918136
I had to do this in python or java, i didnt have a choice.
>>8918121
>what ist the modulo operator
>>8918141
>Doing one of Google's super secrit interviews
Why the fuck does that company act like it's a fucking clubhouse run by 10 year olds?
>>8918153
thats likely the slowest way to do this sort of problem
>>8918128
https://en.wikipedia.org/wiki/Generating_primes
It mentions sieve of Atkin, and wheel sieves.
>>8918174
damn. good link. Sieve of Atkin is pretty sick actually
>https://en.wikipedia.org/wiki/Sieve_of_Atkin