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

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -