Dijkstra's shortest path algorithm in Java using PriorityQueue
Dijkstraâs algorithm is very similar to Primâs algorithm for minimum spanning tree. Like Primâs MST, we generate a SPT (shortest path tree) with a given source as a root. We maintain two sets, one set contains vertices included in the shortest-path tree, other set includes vertices not yet included