Node algorithms that find the shortest path via nodes