A network of n nodes labeled 1 to n is provided along with a list of travel times for directed edges represented as times[i]=(xi, yi, ti), where xi is the source node, yi is the target node, and ti is the delay time from the source node to the target node.
Considering we have a starting node, k, we have to determine the minimum time required for all the remaining for n - 1 nodes to receive the signal. Return −1 if it is not possible for all n - 1 nodes to receive the signal.
Constraints:
k ≤ n A network of n nodes labeled 1 to n is provided along with a list of travel times for directed edges represented as times[i]=(xi, yi, ti), where xi is the source node, yi is the target node, and ti is the delay time from the source node to the target node.
Considering we have a starting node, k, we have to determine the minimum time required for all the remaining for n - 1 nodes to receive the signal. Return −1 if it is not possible for all n - 1 nodes to receive the signal.
Constraints:
k ≤ n