# Network Delay Time

Try to solve the Network Delay Time problem.

## We'll cover the following

## Statement

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]=(x_iâ€‹, \space y_i, \space t_iâ€‹)$, where $x_i$â€‹ is the source node, $y_i$â€‹ is the target node, and $t_i$â€‹ 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 $n - 1$ nodes to receive the signal. Return $-1$ if itâ€™s not possible for all $n - 1$ nodes to receive the signal.

**Constraints:**

- $1 \leq$
`k`

$\leq$`n`

$\leq$ $100$ - $1 \leq$
`times.length`

$\leq$ $6000$ `times[i].length`

$== 3$- $1 \leq x, y \leq$
`n`

- $x$ $!=$ $y$
- $0 \leq t \leq 100$
- Unique pairs of $(x, y)$, which means that there should be no multiple edges

## Examples

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy