Skip to content

Latest commit

 

History

History
12 lines (7 loc) · 238 Bytes

12-SieveOfEratosthenes.md

File metadata and controls

12 lines (7 loc) · 238 Bytes

Sieve Of Eratosthenes

The problem

Write a function f(N) that returns all prime numbers up to N

Concepts

  • Any multiple of a number is not prime

Notes

  • stop looping on square root of N - all primes are calculated by then