Removed redundant greatest_common_divisor code#9358
Removed redundant greatest_common_divisor code#9358cclauss merged 12 commits intoTheAlgorithms:masterfrom
Conversation
…ted the method from Maths folder
…ted the method from Maths folder, also fixed comments
for more information, see https://pre-commit.ci
…ted the method from Maths folder, also fixed comments
|
It says organize imports. Don't know what to do about that. Otherwise there are no issues |
|
@Siddikpatel Please run |
|
Fixed the import issues! |
|
I just remembered that the Python |
|
BTW, @Siddikpatel, there are even more duplicate implementations of gcd if you search for "gcd" in the repo (for example, in |
and, what about those files that imports gcd from math module of python? |
Those are fine—it's fine to import functions as helper functions as long as it doesn't include the core of the actual algorithm |
tianyizheng02
left a comment
There was a problem hiding this comment.
Looks good, but the merge conflict will need to be fixed. I can't fix it myself because I don't have write permission, so could you fix it?
Head branch was pushed to by a user without write access
Ok I am confused now.. It says merge conflicts in |
|
OK, I see what happened: a previous PR moved |
|
Yup, it is fixed now. |
|
It says the file was deleted... did you not move it into the maths module? |
|
@tianyizheng02 @cclauss A couple of days ago |
|
No, there shouldn't be any problems. This PR has already been merged so it can't be "deleted" anyway. For your other PR, GitHub will merge it into the updated codebase, the one with this PR already merged. |

Describe your change:
Previously all the files that needed greatest_common_divisor (aka gcd), used to define the method instead of just importing from Maths directory's greatest_common_divisor.py file. I removed thos definitions and imported gcd method from Maths folder. Fixes #8098
Checklist: