Slightly smaller still Dijkstra's algorithm.