unfinished shortest path algorithm