Java walk through: Sieve of Eratosthenes

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Thank you! This is the 3rd example that I watched and the first one that I understood. Much appreciated.

k.w.
Автор

If you're doing this for project euler problem #10, use long instead of int 

BenNguyen
Автор

thank you. much easier when you explain what youre doing and why. really helped a lot

northwind
Автор

I believe you can make it more efficient by stopping the check when you get to the square root of N

dscripps
Автор

Thanks a lot! Much simpler than when my prof explained it😂

amorningdove
Автор

What if you want to do this for the number 1000 and you want to separate output into multiple lines?

ThatBoiJayGee
Автор

my public static void main string args keeps getting an error why and my public class?

MrDRTK
Автор

how can you include a line which tells you if the inputted number is a prime number or not pls?

Cirillu
Автор

This video helped so much! Thanks for it!

theamjolnir
Автор

Why is this only able to do prime numbers only up to 46349?

Vandole
Автор

I think the code readability is quite bad, for your next videos please use meaningful variable names, also your isPrime array is not been thought through properly, why not just make isPrime[0] and isPrime[1] false and then not have to minus 1 every time you want to assign a value?

readability is essential as a coder

ZoHaiiB
Автор

2*i does not make any sense at all, how is that a solution? i doubt this

Miladinho
Автор

I have sonething similar for my lab if i copy this am I cheating?.

BmCC