-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[OTHER]: Duplicate entry of sieve of eratosthenes #1666
Comments
I think we can get rid of https://github.com/TheAlgorithms/JavaScript/blob/master/Maths/SieveOfEratosthenesIntArray.js; it is strictly inferior to https://github.com/TheAlgorithms/JavaScript/blob/master/Maths/SieveOfEratosthenes.js (except perhaps for being a bit simpler, at the cost of being less optimized). |
Since you've added the beginner-friendly tag, do you wish to keep this issue open for any beginners to take it up or should I do it now and push the changes? (considering we only need to remove certain files) |
Feel free to do it now |
There are three entries for the Sieve of Eratosthenes on the website, with one primary entry containing most implementations, including JavaScript. However, there's another entry named "Sieve of Eratosthenes Int Array," which is a duplicate with only a JavaScript implementation and a confusing name.
Please review and confirm if this is a suitable approach. |
There are two Sieve of Eratosthenes entries in the website ( I think they are duplicate ). It returns an array of boolean which tells the numbers are true or false. There is another one Sieve of Eratosthenes Int Array it return the Array of numbers that are primes only and it doesn't contains any non prime numbers. I think Sieve of Eratosthenes Int Array should not be removed, while out of two Sieve of Eratosthenes entries one should be removed because I think they are duplicate. |
As I said, I think removing the "Int Array" variant is fine. Then there is only one Sieve of Eratosthenes left. |
There is a pr with the necessary change, but they seem to have abandoned it without removing the related tests. |
is this issue still on?? |
Yes. |
i think i got the problem, we should remove one of the implementation right? and according to me user will definitely want 1st one more than the 2nd one...so we should remove the 2nd one...this is the problem right?? |
I think it doesn't matter much. Both variants can easily be turned into the other via postprocessing. I feel https://the-algorithms.com/algorithm/sieve-of-eratosthenes-int-array is a bit cleaner, whereas the other one might be a bit more optimized. But ultimately they both implement the core idea of the Sieve of Eratosthenes. |
Thank you for your input! I agree that both implementations can achieve the same goal through post-processing, and it's great to have flexibility. However, from a user-experience standpoint, we should prioritize clarity and ease of use. What do you think about this approach? |
and can u tell me what you are also thinking specifically...i.e. to remove one of the two or just change the name or heading? |
Remove one of the two, possibly rename it (if we're keeping the "int array" one, we would want to rename that to just "Sieve of Eratosthenes"), consolidate the tests. |
Sounds good! |
I would love to contribute in this , if it open, it is my first time , can you please guide me. |
Hi if this is still open maybe I could work on it. I am a beginner. |
Hey is this still available? |
Hey!! please assign this to me if it's still available. |
Hi I like to work with this. Is it still open to work |
What would you like to share?
There's three entries in total for Sieve of Eratosthenes on the website, but the problem is that there's a primary one out of the three which has a majority of the implementations, including that of JS. However, there's another one which has just another JS implementation of the exact same thing, and it's named Sieve of Eratosthenes Int Array, which is both a weird name and just a random duplicate entry. Since it only had a JS entry, I wasn't sure if I should open an issue on the
website
repo or here, hence I thought as this was a JS repo issue I'd open it here.So, do we remove the duplicate entry from the repository?
Additional information
No response
The text was updated successfully, but these errors were encountered: