Last active
June 24, 2021 15:33
-
-
Save sergey-shpak/042086edc914e735d0842d35bd53ea40 to your computer and use it in GitHub Desktop.
99% correct . 2 is also a prime
sure, you can run printPrimeNumbers(1, 1000) to get also 2 in the results ;)
updated with counting to half of a number
. - this gives two times less operations)
ha, optimization could be tricky), reverting, gonna think about it more)
updated with optimized version (counting to half of a number) ;)
hm, this looks really interesting and according to https://medium.com/indian-thoughts/how-to-find-primes-numbers-203b42ac278e
there is possibility to calculate prime numbers with some pattern, but results are not linear
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
99% correct 👍 . 2 is also a prime