📜  未加权图 bfs 中的最短路径 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:45.263000             🧑  作者: Mango

代码示例2
Input: source vertex = 0 and destination vertex is = 7.
Output: Shortest path length is:2
        Path is::
        0 3 7

Input: source vertex is = 2 and destination vertex is = 6.
Output: Shortest path length is:5
        Path is::
        2 1 0 3 4 6