Try to solve the Network Delay Time problem.
We'll cover the following
Statement
A network of n
nodes labeled to is provided along with a list of travel times for directed edges represented as , where ​ is the source node, ​ is the target node, and ​ 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 nodes to receive the signal. Return if it’s not possible for all nodes to receive the signal.
Constraints:
-
k
n
-
times.length
times[i].length
-
n
- Unique pairs of , which means that there should be no multiple edges