Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title: Count Prime Numbers #58

Closed
dikshat25 opened this issue Oct 16, 2024 · 3 comments
Closed

Title: Count Prime Numbers #58

dikshat25 opened this issue Oct 16, 2024 · 3 comments
Labels
Assigned📋 This issue has been assigned to you! Closed:🚫 This issue or PR is closed due to invalidity or prolonged inactivity and lack of updates. hacktoberfest2024 Your contribution is part of Hacktoberfest 2024! 🎉 No_Update It's been so long you are not responding to this issue so we are going to close the issue soon.

Comments

@dikshat25
Copy link

dikshat25 commented Oct 16, 2024

Initiative (Required)

Hacktoberfest 2024 🎃

Is your feature request related to a problem? Please describe.

Given an integer n, return the number of prime numbers that are strictly less than n.
The problem is to determine how many prime numbers exist that are strictly less than a given integer
𝑛

Describe the solution you'd like.

To solve this problem efficiently, we can use the Sieve of Eratosthenes algorithm
To solve this problem efficiently, we can use the Sieve of Eratosthenes algorithm. This algorithm involves creating a boolean array where each index represents whether the number corresponding to that index is prime. We start by initializing all entries to true (indicating that all numbers are potential primes), except for indices 0 and 1, which are not prime. We then iterate through the array, starting from the first prime number (2). For each prime number found, we mark all of its multiples as not prime. Finally, we count the number of true values remaining in the array, which will give us the total number of primes less than n

Add any other context or screenshots about the feature request here.

No response

Copy link

@dikshat25

It's great having you contribute to this project

Thanks for opening this Issue 🙌 , Welcome to SkillShow 💖 We will review everything and get back to you.
Make sure to give a star to this repo before making a fork! Thank you :)

@dikshat25 dikshat25 reopened this Oct 16, 2024
@dikshat25
Copy link
Author

Please assign this issue to me under the hacktober fest

@Kushal997-das Kushal997-das added Assigned📋 This issue has been assigned to you! hacktoberfest2024 Your contribution is part of Hacktoberfest 2024! 🎉 labels Oct 17, 2024
@Kushal997-das Kushal997-das added No_Update It's been so long you are not responding to this issue so we are going to close the issue soon. Closed:🚫 This issue or PR is closed due to invalidity or prolonged inactivity and lack of updates. labels Oct 31, 2024
Copy link

github-actions bot commented Nov 1, 2024

Hi @dikshat25 👋, your issue #58 has been successfully closed ✅. Thank you for your valuable contribution! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Assigned📋 This issue has been assigned to you! Closed:🚫 This issue or PR is closed due to invalidity or prolonged inactivity and lack of updates. hacktoberfest2024 Your contribution is part of Hacktoberfest 2024! 🎉 No_Update It's been so long you are not responding to this issue so we are going to close the issue soon.
Projects
None yet
Development

No branches or pull requests

2 participants