-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
Another method added for GCD #1387
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
Conversation
maths/greatest_common_divisor.py
Outdated
|
||
# This method is more efficient not acquire more memory cause is no use of any stacks like in recursive as next below mentioned. | ||
def gcd_by_iterative(x,y): | ||
while y:x,y=y,x%y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split this over two lines for readability.
Please add doctests to both functions. See CONTRIBUTING.md for details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now doctest fullfiled for previous added method for GCD.
maths/greatest_common_divisor.py
Outdated
except (IndexError, UnboundLocalError, ValueError): | ||
print("Wrong Input") | ||
|
||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please lose this whitespace.
Cycle_Detection_Undirected_Graph using Disjoint set DataStructure
I am not getting where is problem. Please Marge this all is right. |
Why you have marked as "Automated test is failing". |
* Another method added for GCD * Now doctest fulfilled for added method. * Update greatest_common_divisor.py * Now unnecessary white spaces removed. * Cycle_Detection_Undirected_Graph Cycle_Detection_Undirected_Graph using Disjoint set DataStructure * Update greatest_common_divisor.py again * Again Updated cycle_detection_undirected_graph.py * Delete cycle_detection_undirected_graph.py * Add doctests and format the code with psf/black * fixup: Typo * Update greatest_common_divisor.py * greatest_common_divisor()
No description provided.