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
Deduplicate repeated is_prime
functions
#5434
Comments
Can you assign this to me. |
I will do it! |
Hi! I'm interested in working on this |
Can I try solve this prob? |
This comment has been minimized.
This comment has been minimized.
Are there someone working on this fix? |
Write a function that takes a list sorted in non-decreasing order and deletes any duplicate nodes from the list. The list should only be traversed once. |
I have started to work on this issue. |
Hi @poyea! |
Do the sorting first and then make it a set as the set will return unique values and by this all the duplicates will be removed |
I have other question: some problems in projecteuler folder seens to be resolved already. Some require a function like |
The |
I would say yes, but this may be our second priority because Maybe we can make a list of these |
I left as |
I'll do it. |
These are the occurrencies of repeated
|
This is a list from Project Euler with
It's to register for later decision. |
* Update ciphers.rabin_miller.py maths.miller_rabin.py
assign this to me!!! |
I would also like to help, assign me to this please. |
Assign me to this, please. I would love to help. |
I would also love to help with this! Please assign this to me. |
Perhaps we can change those |
@poyea, I'm trying to fix the last PR, but a pre-commit hook 'Validate filenames' is preventing me due to hyphens found on filenames, like these |
I wanted to learn Python, but it seems to be a difficult language. |
@rileyawheeler here isn't the right place to address this, but I'll open a brief comment here. Python is one of the more user-friendly languages. C \ C++ is difficult. To start with Python, you can try it in phases where each of them treats one topic through this free project's resource here: https://automatetheboringstuff.com/ |
I used to learn Python, but it seems to be a difficult language. |
* Fixes (#5434) * Update ciphers.rabin_miller.py maths.miller_rabin.py * Fixing ERROR maths/miller_rabin.py - ModuleNotFoundError and changing project_euler's isPrime to is_prime function names * Update sol1.py * fix: try to change to list * fix pre-commit * fix capital letters * Update miller_rabin.py * Update rabin_miller.py Co-authored-by: John Law <johnlaw.po@gmail.com>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
And these issues? We'll be working on them? These are the occurrences of repeated isprime() like functions found on main libraries of the whole project: maths.primelib.isPrime() data_structures.hashing.number_theory.prime_numbers.py |
is_prime function to check whether a given number is prime using O(sqrt N) algorithm
|
Assign this to me. |
* Fixes (TheAlgorithms#5434) * Update ciphers.rabin_miller.py maths.miller_rabin.py * Fixing ERROR maths/miller_rabin.py - ModuleNotFoundError and changing project_euler's isPrime to is_prime function names * Update sol1.py * fix: try to change to list * fix pre-commit * fix capital letters * Update miller_rabin.py * Update rabin_miller.py Co-authored-by: John Law <johnlaw.po@gmail.com>
Is this problem has been solved ? or i will love to solve this. |
@Amanrk7 I think the goal here is to make them uniform in function calls and implementations (as opposed to originally make them shared). In this way, every file of code is self-contained and easier to follow. It would be helpful if you could figure out where those functions are, and how they are implemented - then make those functions 1.) use |
give me some sort of problems like this i will show you the output |
Please solve this problem
…On Sat, 11 Jun 2022, 18:32 Aman RK, ***@***.***> wrote:
Is this problem has been solved ? or i will love to solve this.
—
Reply to this email directly, view it on GitHub
<#5434 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATCOCCS3DUXUQW4EGPLFVXLVOS5SBANCNFSM5GIZBEHQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi everyone! So I was searching for a good-first-issue to start contributing to the open source community, and since I have a PhD in Theoretical Computer Science, The Algorithms looks like the best place for me (python is also my favorite programming language So I was reading all these comments here and did some digging in the source code and I have the following.
I could do all these changes if no one else has done anything. Cheers to all of ya! |
Hey @elpaxoudis! For 1 & 2, yes, and these can be done altogether in this issue. It would be of help if you could check also other algorithms and files in this repository which define a For 3, I agree that one of them is a duplicate. Let's handle it in a different issue (or without an issue because it's straightforward in terms of scale of change). We can merge all the test cases / comments, while preserving one clearer version. |
Renames functions related to primality check Corrects doctest Changes implementation to be O(sqrt(n)) Adds QOL changes Adds doctests Adds more info Adds precondition test Adds typehints in function definition
We have a lot of
is_prime
(or similar) functions: https://github.com/TheAlgorithms/Python/search?p=4&q=is_prime, https://github.com/TheAlgorithms/Python/search?q=isPrime, data_structures/hashing/number_theory/prime_numbers, etc. Shall we use one common function for that exactly identicalis_prime
calculation (which takesO(sqrt(n))
)?Candidates include:
The text was updated successfully, but these errors were encountered: