djkstra's algorithm | ScratchStats