Dijkstra’s Algorithm to find the shortest path
•	Our naive algorithm will result in time complexity of O(n!)
•	D’s algorithm is O(n^2)
•	The algorithm finds shortest path from vertext j to k.
•	In the process it may end up finding shortest path from j to many other vertices.
•	We maintain an array of integers called p that tells us what was the previous node in the path, i.e. p[k] tells us what is the previous point in the path from orig to k.
•	Array of doubles called d tells us length of the shortest path from orig to k, i.e. d[k] = legth of shortest path from orig to k.
•	set p[k] to be equal to 0 for all the nodes, and set d[k] = infinity for all the nodes.
•	d[orig] = 0;
•	Let S be a set implmented using a doubly linked list, initialized to empty
 while(S.Length() != N.Vertices())
 {
         int u = GetNext(N,S,d); // get a node with smallest d which is not already in S
         if(d[u] == infinity) return false;
         if(u == dest) return true;
         add u to S
         for(int v = 1; v <= N.Vertices(); v++)
                 if(if there is an edge (u,v) && v is not in S)
                 {
                         if(d[u] + N.Weight(u,v) < d[v])
                         {
				d[v] = d[u] + N.Weight(u,v);
				u is the previous node for v
			}
		}
}
return false;
•	See the board for illustration of the algorithm