-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
Updated check_bipartite_graph_dfs.py #9525
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
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@tianyizheng02 please merge my PR, awaiting your review |
@tianyizheng02 awaiting your review #9525 |
@tianyizheng02 could you please approve my PR review #9525? This is my first time contributing in this repository. Also please include hacktoberfest accepted label! Thanks again |
@tianyizheng02 please look after this PR #9525 and merge this PR for hacktoberfest |
@tianyizheng02 please look after #9525 and merge the PR for hacktoberfest |
@tianyizheng02 @cclauss please look after this PR #9525 and merge the PR, so that it can be eligible for hacktoberfest. Please also add hacktoberfest-accepted label. Thanks a lot! |
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
for more information, see https://pre-commit.ci
I have actually done that in vscode, but the change that you have given seemingly shows some format errors, which is alright; Apart from that is the code okay, as edited by the changes that you have suggested? @cclauss |
@cclauss looks like the code is having some error, in build, could you please point out the error? |
@cclauss I have made the required changes, and the checks are also correct, could you please review that and merge the PR? It will be very helpful in hacktoberfest also if you add the hacktoberfest-accepted label |
@cclauss @tianyizheng02 please someone check the review and approve my PR! Awaiting for review! |
This is complex code so let's use self-documenting function and variable names to help readers to understand. We should not shorten names to simplify the code formatting but use understandable name and leave to code formatting to psf/black. I am not sure if `nbor` was supposed to be `neighbour`. ;-)
This is complex code so let's use function and variable names that are self-documenting to help readers understand. We should not shorten names to simplify the code formatting but use understandable names and leave the code formatting to psf/black. I am unsure if |
All the checks have passed! @cclauss |
I actually did it intentionally, so that my formatting can be correct according to the ruff linter 😅 @cclauss |
@cclauss could you please check this PR once again? |
https://docs.astral.sh/ruff/faq/#is-ruff-compatible-with-black ;-) They both run in our Python/.pre-commit-config.yaml Lines 18 to 26 in 87494f1
|
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.
Nice work!!!
I think I forgot it 😅 |
Please add hacktoberfest-accepted label so that it can be accepted in hacktoberfest @cclauss |
Hacktoberfest knows this repo... They will accept this automatically but just in case... |
Thanks a lot @cclauss ! |
* Create dijkstra_algorithm.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update dijkstra_algorithm.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update dijkstra_algorithm.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update dijkstra_algorithm.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Delete greedy_methods/dijkstra_algorithm.py * Update check_bipartite_graph_dfs.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update check_bipartite_graph_dfs.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update graphs/check_bipartite_graph_dfs.py Co-authored-by: Christian Clauss <[email protected]> * Update graphs/check_bipartite_graph_dfs.py Co-authored-by: Christian Clauss <[email protected]> * Update check_bipartite_graph_dfs.py * Update check_bipartite_graph_dfs.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update check_bipartite_graph_dfs.py * Update check_bipartite_graph_dfs.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update check_bipartite_graph_dfs.py * Update check_bipartite_graph_dfs.py * Update check_bipartite_graph_dfs.py * Let's use self-documenting variable names This is complex code so let's use self-documenting function and variable names to help readers to understand. We should not shorten names to simplify the code formatting but use understandable name and leave to code formatting to psf/black. I am not sure if `nbor` was supposed to be `neighbour`. ;-) * Update check_bipartite_graph_dfs.py --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <[email protected]>
Describe your change:
Updated the check_bipartite_graph_dfs.py in the graph folder which will reduce the time complexity. Furthermore I also included doctest module for testing some test cases included in the code.
Checklist: