Morg0th's blog

By Morg0th, 8 months ago, In English

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

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it

By Morg0th, history, 18 months ago, In English

As im a noob and i have given my first contest yesterday and i was not able to solve a single question i want some really good advices and practises from people who have already achieved it please help me in my journey :)

Full text and comments »

  • Vote: I like it
  • -35
  • Vote: I do not like it

By Morg0th, history, 18 months ago, In English

I m completely new to this platform and this field i want some help on how to do problems and stuff here i want to improve my skills any advice will be helpful :)

Full text and comments »

  • Vote: I like it
  • -44
  • Vote: I do not like it