Skeleton for Dijkstra algorithm
Dijkstra implementation.