← 返回 microsoft 的题目列表Find Shortest Path in Cyclic Graph
类型:online_judge
Given a directed graph with possible cycles, design an algorithm to find the shortest path from a start node to an end node.
Example
Input
4 5
1 2 1
2 3 2
3 1 1
2 4 4
3 4 3
1 4
Output
Shortest path length: 5