Prim , Kruskal or Dijkstra I've a lot of doubts on these three algorithm , I can't understand when I've to use one or the other in the exercise , because the problem of minimum spanning tree and shortest path are very similar . Someone can explain me the difference and give me some advice on how I can solve the exercise? Thank you so much. 

Prim and Kruskal are for spanning trees, and they are most commonly used when the problem is to connect all vertices, in the cheapest way possible.
For Example, designing routes between cities.
Dijkstra, is for finding the cheapest route between two vertices.
For Example, GPS navigation.
