Sieve of Eratosthenes

January 2016 · 1 minute read

I had a bad experience with the Sieve of Eratosthenes during a college test, I became traumatized by it and tried to avoid it. During this holiday break I decided to face my fears (lol) and successfully implemented it ruby (not very idiomatic but ruby still)

My favorite parts of this algorithm were: