XNight_KingX's blog

By XNight_KingX, history, 5 years ago, In English

which one is better for bipartition check BFS or DFS? I think DFS is better but not able to Deduce this intuition clearly? can you help me with that. Noobie here, pls go less hard>> :)

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

No, it's your output -1, but jury says it is bipartite

»
5 years ago, # |
  Vote: I like it +8 Vote: I do not like it

which one is better for bipartition check BFS or DFS? I think DFS is better but not able to Deduce this intuition clearly? can you help me with that. Noobie here, pls go less hard>> :)

In general there is no difference, use what is comfortable to implement.