1.1.0 • Published 4 years ago

simple-prime-generator v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Generate prime numbers

3 strategies

  • Naive (O(n^2)) -> naive
  • Optimized (O(n^3/2)) -> opt
  • Eratosthenes' sieve (O(n*log(log(n)))) -> best

Run in the console

Examples:

gen-primes 1 10 naive
->[ 2, 3, 5, 7 ]
gen-primes 1 10 opt
->[ 2, 3, 5, 7 ]
gen-primes 1 10 best
->[ 2, 3, 5, 7 ]
1.1.0

4 years ago

1.0.9

4 years ago

1.0.10

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago