Problem I’ve just done Project Euler question 10: Find the sum of all the primes below two million. I get […]
Tag: sieve-of-eratosthenes
Unbounded Sieve of Eratosthenes in Swift
Problem I’ve spent a while teaching myself Swift, and decided to take on the challenge of writing an unbounded Sieve […]
Efficiency of a recursive implementation of the Sieve of Erasthotenes in Python
Problem I implemented the Sieve of Erasthotenes recursively using filter and I was wondering how efficient this implementation is and […]
Sieve of Eratosthenes solution for CodeEval
Problem The code below takes integer n as input, and delivers a list of all primes up to integer n […]
Attemped Sieve of Eratosthenes
Problem I’ve just done Project Euler question 10: Find the sum of all the primes below two million. I get […]
Sieve of Eratosthenes in C#
Problem Just because I’ve never written a real Sieve of Eratosthenes, I decided I should probably write one just to […]
Sieve32, a simple 32 bit sieve returning IEnumerable using C#
Problem What a difference 1 bit makes! This very fast, simple sieve of Eratosthenes quickly finds 32 bit primes. It […]
Incremental Sieve of Eratosthenes Generator
Problem So I was fiddling around with the Euler challenges. One of the things they mentioned in their discussions of […]
Sieve of eratosthenes with std::vector
Problem How can I improve and optimise this code? #include <iostream> #include <vector> std::vector<bool> sieve_of_eratosthenes(int n) { std::vector<bool> primes(n+1, true); […]
A Sieve of Eratosthenes
Problem I have written this Sieve of Eratosthenes. This is a bit of software that will find all of the […]