Problem Type : Single-Source Shortest Paths On Unweighted Graph (BFS/DFS)
Its a basic SSSP problem.
"The cost of a shipment is equal to the size of the shipment times the number of shipping legs required times $100."
we just have to do a bfs or dfs from given source if we have't done bfs or dfs on the source before.We can get the cost of the shipment using the above statement using the cost of the destination :D
Its a basic SSSP problem.
"The cost of a shipment is equal to the size of the shipment times the number of shipping legs required times $100."
we just have to do a bfs or dfs from given source if we have't done bfs or dfs on the source before.We can get the cost of the shipment using the above statement using the cost of the destination :D
No comments:
Post a Comment