unweighted = take each distance ( edge weight ) = 1 unit.

now think how dijkstra's work and bfs work.. U will realize

now think how dijkstra's work and bfs work.. U will realize

The Gateway to Computer Science Excellence

0 votes

Which of the following procedure results same output as Dijkstra’s Algo. on unweighted graph on $'n'$ verices?

$A)$ BFS $B)$ DFS $C)$Kruskal $D)$ Prims

As far I know Dijkstra and Prims both have $T.C.=O(E+VlogV)$

But ans given BFS.

How this ans possible??

+1 vote

Best answer

52,375 questions

60,560 answers

201,961 comments

95,381 users