GoalScope — bipartite_check (Qwen2.5-Coder-32B-Instruct) — hover a token to see the patched verbalization
↵
<code>↵
def bipartite_check(graph):↵
"""Check if the given graph is bipartite."""↵
color = {}↵
for node in graph:↵
if node not in color:↵
stack = [node]↵
color[node] = 0↵
while stack:↵
u = stack.pop()↵
for v in graph[u]:↵
if v not in color:↵
color[v] = 1 - color[u]↵
stack.append(v)↵
elif color[v] == color[u]:↵
return False↵
return True↵
</code>