Uh oh!
There was an error while loading. Please reload this page.
Removed redundant greatest_common_divisor code - #9358
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
Siddikpatel
commented
Oct 2, 2023
It says organize imports. Don't know what to do about that. Otherwise there are no issues |
tianyizheng02
commented
Oct 7, 2023
@Siddikpatel Please run |
Siddikpatel
commented
Oct 8, 2023
Fixed the import issues! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tianyizheng02
commented
Oct 8, 2023
I just remembered that the Python |
tianyizheng02
commented
Oct 8, 2023
BTW, @Siddikpatel, there are even more duplicate implementations of gcd if you search for "gcd" in the repo (for example, in |
Siddikpatel
commented
Oct 8, 2023
and, what about those files that imports gcd from math module of python? |
tianyizheng02
commented
Oct 8, 2023
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?
Uh oh!
There was an error while loading. Please reload this page.
Head branch was pushed to by a user without write access
Siddikpatel
commented
Oct 9, 2023
Ok I am confused now.. It says merge conflicts in |
tianyizheng02
commented
Oct 9, 2023
OK, I see what happened: a previous PR moved |
Siddikpatel
commented
Oct 9, 2023
Yup, it is fixed now. |
tianyizheng02
commented
Oct 9, 2023
It says the file was deleted... did you not move it into the maths module? |
Siddikpatel
commented
Oct 9, 2023
@tianyizheng02@cclauss A couple of days ago |
tianyizheng02
commented
Oct 9, 2023
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: