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

[OTHER]: Duplicate entry of sieve of eratosthenes #1666

Open
SpiderMath opened this issue May 22, 2024 · 7 comments · May be fixed by #1674
Open

[OTHER]: Duplicate entry of sieve of eratosthenes #1666

SpiderMath opened this issue May 22, 2024 · 7 comments · May be fixed by #1674
Labels
beginner-friendly Easy to implement chore General improvement

Comments

@SpiderMath
Copy link
Contributor

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

@SpiderMath SpiderMath added the awaiting triage Awaiting triage from a maintainer label May 22, 2024
@appgurueu
Copy link
Collaborator

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

@appgurueu appgurueu added beginner-friendly Easy to implement chore General improvement and removed awaiting triage Awaiting triage from a maintainer labels May 23, 2024
@SpiderMath
Copy link
Contributor Author

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)

@appgurueu
Copy link
Collaborator

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

SpiderMath added a commit to SpiderMath/Javascript_TheAlgorithms that referenced this issue May 25, 2024
@AbhishekMane06
Copy link

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.

  • Remove the "Sieve of Eratosthenes Int Array" entry to avoid confusion and maintain consistency.
  • Ensure no unique features or references are lost in the process.

Please review and confirm if this is a suitable approach.

@PranjalShrivas
Copy link

PranjalShrivas commented Jul 14, 2024

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.
Please tell if I am in right direction.

@appgurueu
Copy link
Collaborator

As I said, I think removing the "Int Array" variant is fine. Then there is only one Sieve of Eratosthenes left.

@raklaptudirm
Copy link
Member

There is a pr with the necessary change, but they seem to have abandoned it without removing the related tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner-friendly Easy to implement chore General improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants