Description:
Count the number of prime numbers less than a non-negative number, n.
Credits:
Special thanks to @mithmatt for adding this problem and creating all test cases.
public int countPrimes(int n) {
int count = 0;
for (int i = 2; i < n; i++)
if (isPrime(i))
count++;
return count;
}
public boolean isPrime(int n) {