How do i reduce the space complexity in Sieve of Eratosthenes to generate prime between a and b?

前端 未结 4 740
感情败类
感情败类 2020-12-10 22:41

After getting through some of the SO posts, i found Sieve of Eratosthenes is the best & fastest way of generating prime numbers.

I want to generate the prime num

4条回答
  •  盖世英雄少女心
    2020-12-10 23:12

    Sorenson Sieve might be worth a peek if space complexity is really an issue. Got the reference from the wikipedia page you shared.

提交回复
热议问题