What is the difference between Dijkstra and Prim's algorithm?

Pradit picture Pradit · Dec 10, 2012 · Viewed 39.9k times · Source

What is the exact difference between Dijkstra's and Prim's algorithms? I know Prim's will give a MST but the tree generated by Dijkstra will also be a MST. Then what is the exact difference?

Answer