I first learned in my college years in Sedgwick’s algorithm book to see Prim’s minimum spanning tree algorithm and Dijkstra’s single source shortest path algorithm as two applications of the same priority first search algorithm. Moreover, it is also easy to see that breadth first search and (a slightly different…