Algorithms icon indicating copy to clipboard operation
Algorithms copied to clipboard

Count Primes

Open KhushiVaiskyar opened this issue 1 year ago • 5 comments

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

KhushiVaiskyar avatar Jun 06 '23 08:06 KhushiVaiskyar

@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 .

Veena4512 avatar Jun 06 '23 13:06 Veena4512

@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

Soumya6Tiwari avatar Jun 07 '23 05:06 Soumya6Tiwari

@Kumar-laxmi Would like to contribute in this issue. Please assign me this issue

RugvedDhabale avatar Jun 07 '23 15:06 RugvedDhabale

@Kumar-laxmi I would like to contribute to this issue. Please assign me this issue.

Ashutosh-0506 avatar Jun 15 '23 20:06 Ashutosh-0506

@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)

sudo-dpkg avatar Jun 29 '23 13:06 sudo-dpkg

Stale issue message

github-actions[bot] avatar Jun 27 '24 16:06 github-actions[bot]