chinesecoder's blog

By chinesecoder, history, 14 months 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

»
14 months ago, # |
  Vote: I like it +20 Vote: I do not like it

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

»
14 months ago, # |
  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