Outstanding paths

Report a typo

Given below is a directed weighted graph:

 directed weighted graph

For each node vv, amid all shortest paths starting from vv to all other nodes, find the one with the lowest weight, say dvd_v. The output should contain the corresponding weights in the following order: d1,d2,d3,d4,d5d_1, d_2, d_3, d_4, d_5.

Answer format example: 11 -7 4 16 -3

Enter a short text
___

Create a free account to access the full topic