Given an integer n, return the number of prime numbers strictly less than n.
n
n = 10
4
Why
2, 3, 5 and 7
n = 0
0
0 <= n <= 5 * 10^6
Topics
Implement countPrimes in the editor and return the answer — printing it is never graded.
countPrimes
Problem 44 of 1146 in the arena