2 wangmg0118 wangmg0118 于 2014.11.20 20:16 提问

如何用c++实现第k条最短路径的算法?
c++

The shortest path problem can be defined for graphs whether undirected, directed, or mixed. It is defined here for undirected graphs; for directed graphs the definition of path requires that consecutive vertices be connected by an appropriate directed edge.
Two vertices are adjacent when they are both incident to a common edge. A path in an undirected graph is a sequence of vertices such that is adjacent to for . Such a path is called a path of length from to .

2个回答

jiangzuzai
jiangzuzai   2014.11.20 20:32

用dijkstra算法。

wangmg0118
wangmg0118 那大神有这个算法的小点的代码例子吗?
3 年多之前 回复
wangmg0118
wangmg0118   2014.11.21 20:23

那大神有这个算法的小点的代码例子吗?

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!