Shortest path finder impl