Skip to content

[Dijkstra] Network Delay Time #130

@sudosf

Description

@sudosf

Problem

Given a network of n nodes, times array of directed edges (u, v, w), and source k, return the minimum time for all nodes to receive the signal. Return -1 if impossible.

References

Difficulty

🟡 Medium

Companies

Amazon, Google, Goldman Sachs

Notes

Language: Java
Standard Dijkstra from source k. Answer is max of all shortest distances. If any node unreachable, return -1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    graphGraph problemsmediumMedium difficulty

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions