@@ -40,13 +40,6 @@ def is_bipartite_dfs(graph: dict[int, list[int]]) -> bool:
4040 False
4141 >>> is_bipartite_dfs({-1: [0, 2], 0: [-1, 1], 1: [0, 2], 2: [-1, 1]})
4242 True
43- >>> is_bipartite_dfs({0.9: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2]})
44- True
45-
46- >>> # FIXME: This test should fails with
47- >>> # TypeError: list indices must be integers or...
48- >>> is_bipartite_dfs({0: [1.0, 3.0], 1.0: [0, 2.0], 2.0: [1.0, 3.0], 3.0: [0, 2.0]})
49- True
5043 >>> is_bipartite_dfs({"a": [1, 3], "b": [0, 2], "c": [1, 3], "d": [0, 2]})
5144 True
5245 >>> is_bipartite_dfs({0: ["b", "d"], 1: ["a", "c"], 2: ["b", "d"], 3: ["a", "c"]})
@@ -120,13 +113,6 @@ def is_bipartite_bfs(graph: dict[int, list[int]]) -> bool:
120113 False
121114 >>> is_bipartite_bfs({-1: [0, 2], 0: [-1, 1], 1: [0, 2], 2: [-1, 1]})
122115 True
123- >>> is_bipartite_bfs({0.9: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2]})
124- True
125-
126- >>> # FIXME: This test should fails with
127- >>> # TypeError: list indices must be integers or...
128- >>> is_bipartite_bfs({0: [1.0, 3.0], 1.0: [0, 2.0], 2.0: [1.0, 3.0], 3.0: [0, 2.0]})
129- True
130116 >>> is_bipartite_bfs({"a": [1, 3], "b": [0, 2], "c": [1, 3], "d": [0, 2]})
131117 True
132118 >>> is_bipartite_bfs({0: ["b", "d"], 1: ["a", "c"], 2: ["b", "d"], 3: ["a", "c"]})
0 commit comments