An example of Dijkstra's algorithm.