3 ms·
nit. that's not the Sieve of Eratosthenes. That's trial division. Sieve is O(n log log n) but trial division is O(n^2)
by nh23423fefe 2y ago
nit. that's not the Sieve of Eratosthenes. That's trial division.
Sieve is O(n log log n) but trial division is O(n^2)