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:

https://gist.github.com/marinhero/b37340f8e8ae073e79fb