Skip to content

Commit 56dbca8

Browse files
Update check_bipatrite.py
1 parent 9ce8cbf commit 56dbca8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

graphs/check_bipatrite.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ def is_bipartite_dfs(graph: defaultdict[int, list[int]]) -> bool:
4141
>>> is_bipartite_dfs({-1: [0, 2], 0: [-1, 1], 1: [0, 2], 2: [-1, 1]})
4242
True
4343
>>> is_bipartite_dfs({0.9: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2]})
44-
Traceback (most recent call last):
45-
...
46-
KeyError: 0
44+
True
4745
4846
>>> # FIXME: This test should fails with
4947
>>> # TypeError: list indices must be integers or...
@@ -127,9 +125,7 @@ def is_bipartite_bfs(graph: defaultdict[int, list[int]]) -> bool:
127125
>>> is_bipartite_bfs({-1: [0, 2], 0: [-1, 1], 1: [0, 2], 2: [-1, 1]})
128126
True
129127
>>> is_bipartite_bfs({0.9: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2]})
130-
Traceback (most recent call last):
131-
...
132-
KeyError: 0
128+
True
133129
134130
>>> # FIXME: This test should fails with
135131
>>> # TypeError: list indices must be integers or...

0 commit comments

Comments
 (0)