1. Code for Dijkstra's algorithm.
2. Fix priority queue, make type of priority a template parameter.
Code for Prim's algorithm.