Skip to main content
Code Review

Return to Answer

added 2 characters in body
Source Link
200_success
  • 145.5k
  • 22
  • 190
  • 479

By performing recursion, you aare performing a depth-first search of four-letter words. However, this task involves finding a shortest path, and shortest-path problems are generally better done using breadth-first search. With BFS, the first solution you encounter will be an optimal solution — which is not the case with DFS.

By performing recursion, you a performing a depth-first search of four-letter words. However, this task involves finding a shortest path, and shortest-path problems are generally better done using breadth-first search. With BFS, the first solution you encounter will be an optimal solution — which is not the case with DFS.

By performing recursion, you are performing a depth-first search of four-letter words. However, this task involves finding a shortest path, and shortest-path problems are generally better done using breadth-first search. With BFS, the first solution you encounter will be an optimal solution — which is not the case with DFS.

Source Link
200_success
  • 145.5k
  • 22
  • 190
  • 479

By performing recursion, you a performing a depth-first search of four-letter words. However, this task involves finding a shortest path, and shortest-path problems are generally better done using breadth-first search. With BFS, the first solution you encounter will be an optimal solution — which is not the case with DFS.

lang-py

AltStyle によって変換されたページ (->オリジナル) /