chinesecoder's blog

By chinesecoder, history, 8 years ago, In English

Can a question which can be solved with dfs can also be solved with bfs if we use the right modifications and ideas¿

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

| Write comment?
»
8 years ago, hide # |
 
Vote: I like it +20 Vote: I do not like it

No. For example, take the problem that says "Implement a DFS".

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

No, you can hit memory constraints. For details you can look at USACO Disruption's intended solution.

Spoiler