Compute the minimum time for a signal to reach all nodes in a weighted directed network.
Constraints
Example
>>> network_delay_time([[2,1,1],[2,3,1],[3,4,1]], 4, 2) 2 >>> network_delay_time([[1,2,1]], 2, 1) 1 >>> network_delay_time([[1,2,1]], 2, 2) -1
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints