Algorithm · Google · Medium
For a directed graph whose edges carry travel times, determine how long it takes a signal sent from one chosen node to reach every node. Report the largest among the minimum arrival times; if at least one node cannot be reached, return -1. Example The signal reaches node 3 in 4 time units, which is the latest shortest-path arrival.
Checking your access…