Algorithms
Algorithms copied to clipboard
Count Primes
If an integer n is given , My code will return the number of prime numbers that are strictly less than n. Please Assign me this issue. Thank you
@Kumar-laxmi I can work with optimization and code them starting from brute force to optimized code in python ,java and c++. Please assign this issue to me .
@Kumar-laxmi sir please assign me this issue , I really want to make a start in open source, kindly assign me this issue. I can solve it using C, C++, JAVA
@Kumar-laxmi Would like to contribute in this issue. Please assign me this issue
@Kumar-laxmi I would like to contribute to this issue. Please assign me this issue.
@Kumar-laxmi can you assign me this under SSOC'23
Method 1: A simple solution is to traverse all the numbers, check if current number is prime. If yes, increment the count. Finally, return the count.
Method 2: An efficient solution is to use Sieve of Eratosthenes algorithm to find all primes up to the given limit.
Time Complexity : O(n * log(log(n))) Space Complexity : O(n)
Stale issue message