3 Commits

Author SHA1 Message Date
S. M. Mohiuddin Khan Shiam
561cc383ec Fix RuntimeError in bipartite-check DFS/BFS and clean up doctests (#12814)
* Fix `RuntimeError` in bipartite-check DFS/BFS and clean up doctests

* Iteration over `graph` mutated by `defaultdict` neighbours caused
  `RuntimeError: dictionary changed size during iteration`.
  – Iterate over `list(graph)` in both DFS and BFS helpers.
* Corrected `if __name__ == "__main__":` typo.
* Updated two doctests that now succeed after the fix.

All doctests now pass (`30/30`), eliminating a critical runtime failure and improving reliability of the graph algorithms.

Co-Authored-By: S. M. Mohiuddin Khan Shiam <147746955+mohiuddin-khan-shiam@users.noreply.github.com>

* Update check_bipatrite.py

* Update check_bipatrite.py

* Update check_bipatrite.py

* Update check_bipatrite.py

* Update check_bipatrite.py

* Update check_bipatrite.py

* Update check_bipatrite.py

* Update check_bipatrite.py

* Update check_bipatrite.py

---------

Co-authored-by: Odio Marcelino <odiomarcelino@gmail.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-08-25 00:47:46 +03:00
Maxim Smolskiy
c36aaf0fbc Fix sphinx/build_docs warnings for graphs/check_bipatrite (#12469)
* Fix sphinx/build_docs warnings for graphs/check_bipatrite

* Fix
2024-12-24 03:48:37 -05:00
shivaparihar6119
197604898b Concatenates both check bipatrite graphs(bfs&dfs) (#10708)
* 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>
2023-10-20 08:09:58 +02:00