Problem description, from Project Euler Find the sum of all the primes below N. Solution Brute-forced it again, but it still runs in less than 30 seconds (at least on my MacBook Pro). This one was simple using the Sieve of Eratosthenes from problem 7. The sieve, collapsed because it’s the same as from problem […]
sieve of eratosthenes
There are 2 posts tagged sieve of eratosthenes.
Project Euler Problem 3 Solution: Clojure
Problem description, from Project Euler What is the largest prime factor of the number N? Solution In previous problems, I was using a list of primes I got somewhere else. I figured it would be relevant to implement a prime-finding algorithm. I decided to go with simplicity, and implement the Sieve of Eratosthenes. It’s basically […]