How do I efficiently calculate primes?

* Disclaimer: I have tested none of this code yet. Please do share if you find a syntactic error here. 🙂 I’m trying to practice my ability to write code without an editor and without testing every little step as I build it.

This question came up about a week and a half ago and it wasn’t directly asked of me, but I was intrigued enough to finally dig into it. This is something that’s come up in various projects for school and once in a hackerrank challenge for me. My brain likes to scream “There has to be a better way!” at me as I hack my way on through to get things done because I just don’t have the time to dig into it.

Continue reading “How do I efficiently calculate primes?”