* 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>
* 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>