Efficiently finding the shortest path in large graphs

后端 未结 7 2064
一生所求
一生所求 2020-12-13 20:46

I\'m looking to find a way to in real-time find the shortest path between nodes in a huge graph. It has hundreds of thousands of vertices and millions of edges. I know this

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-13 21:33

    BFS in an undirected graph is only about 25 lines of code. You don't need a library. Check out the example code in the Wikipedia article.

提交回复
热议问题