bool isBipartite = true;
void dfs(int node, int color) { vis[node] = color;
for(auto it: adj[node])
{
if(vis[it] == 0)
{
dfs(it, 3 - color);
}
if(vis[it] == vis[node])
{
isBipartite = false;
return;
}
}
}
can someone tell me what is wrong with this implementation i was doin building teams problem on cses