MediumGraphs
Network Delay Time
Time for all nodes to receive signal
Solution Approach
Dijkstra shortest path
Complexity Analysis
Time Complexity
O(n*log n + e)Space Complexity
O(n)Complexity
Time:O(n*log n + e)
Space:O(n)
Asked at
GoogleAmazon
Time for all nodes to receive signal
Dijkstra shortest path
Time Complexity
O(n*log n + e)Space Complexity
O(n)