Glossary term

What is Sieve of Eratosthenes? Meaning for developers

A way to find every prime up to n. Cross out the multiples of each prime in turn. What is never crossed out is prime. About O(n log log n).

Learn it properly · DSALesson 13: Basic Maths for DSADigits, divisors, primes, the sieve, GCD and LCM, and fast powers.

All DSA terms

Related terms

← All glossary terms, A to Z