Dijkstra algorithm in graph is more similar to DFS or BFS? -


i have answer question dont know more similar. saw dijkstra algorithm similar in ways bfs dfs. may explain me answer , why? thanks!

neither.

dijkstra indeed dynamic programming dp[v] = min{dp[u] + w(u,v)} u has calculated , w(u, v) edge value.

it can proved using greedy right.

bfs , dfs methods search graph need. kind of things need?

if want distance node edge value 1, ok bfs special case of dijkstra.

if other algorithm or want other things bfs or dfs, there's noting dijkstra, or not similar them.


Comments

Popular posts from this blog

testing - Detect whether test has failed within fixture -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

android - Create single AAR file from multiple modules using Gradle -