* Improve comments, add doctests for kahns_algorithm_topo.py
* Improve function docstring
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Rename variables, remove print
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* updating DIRECTORY.md
* Fix some SIM114 per file ignores
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix review issue
---------
Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Enable ruff E741 rule
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Enable ruff SIM102 rule
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Enable ruff PLR5501 rule
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Use compiled black as the pre-commit formatter
* ruff-format
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Keep GitHub Actions up to date with Dependabot
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* add ant_colonyant_colony_optimization_algorithms.py
* Modify details
* Modify type annotation
* Add tests for KeyError, IndexError, StopIteration, etc.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* sync
* fixes#8098
* deleted: graphs/check_bipartite_graph_all.py
new file: graphs/check_bipatrite,py
* renamed: graphs/check_bipatrite,py -> graphs/check_bipatrite.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add the new tests
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* [ADD] tests for check_bipartite_graph_bfs
* linter fix?
* linter fix
* [ADD] more test cases check_bipartite_graph_bfs
* doctest fixes. Forgot to add 'Traceback...'
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* missed a Traceback
* Update check_bipartite_graph_bfs.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Adds Doc test in depth_first_search_2.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixes depth_first_search_2.py formatting
* Cleanup
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* test: adding more tests to a star algorithm
* Apply suggestions from code review
* Update a_star.py
---------
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Added algorithm to deeply clone a graph
* Fixed file name and removed a function call
* Removed nested function and fixed class parameter types
* Fixed doctests
* bug fix
* Added class decorator
* Updated doctests and fixed precommit errors
* Cleaned up code
* Simplified doctest
* Added doctests
* Code simplification
* 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 <cclauss@me.com>
* Update graphs/check_bipartite_graph_dfs.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* 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 <cclauss@me.com>