DEV Community

Discussion on: Best way to get all prime numbers (Sieve of Eratosthenes)

Collapse
 
lurb3 profile image
lurb3

By the way,

for(let i=2; i<=max; i++)
{
is_prime[i]=true;
}

Won't this crash if you test with 1 million number?