TheAlgorithms / PHP

All Algorithms implemented in PHP
MIT License
2.14k stars 467 forks source link

Sieve of Eratosthenes algorithm #159

Closed rzarno closed 3 months ago

rzarno commented 3 months ago

Sieve of Eratosthenes algorithm.

This algorithm helps to find prime numbers by eliminating multiples of each prime. https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes